My LeetCode grinding. Trying to do a problem a day.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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"]