My LeetCode grinding. Trying to do a problem a day.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

problem.txt 458B

123456789101112131415161718
  1. Write a function that reverses a string. The input string is given as an array of characters char[].
  2. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
  3. You may assume all the characters consist of printable ascii characters.
  4. Example 1:
  5. Input: ["h","e","l","l","o"]
  6. Output: ["o","l","l","e","h"]
  7. Example 2:
  8. Input: ["H","a","n","n","a","h"]
  9. Output: ["h","a","n","n","a","H"]