344. Reverse String
问题简述
Write a function that reverses a string. The input string is given as an array of characters s.You must do this by modifying the input array in-place with O(1) extra memory.
双指针,同时更新并交换两个数值。
1 | class Solution { |
344. Reverse String