344. Reverse String
題目原文
Write a function that takes a string as input and returns the string reversed.
Example 1:
Example 2:
解題思路
第一個字元與最後一個字元交換。
第二個字元與倒數第二個字元交換。
以此類推。
程式解答
Last updated
Was this helpful?
Write a function that takes a string as input and returns the string reversed.
第一個字元與最後一個字元交換。
第二個字元與倒數第二個字元交換。
以此類推。
Last updated
Was this helpful?