翻转字符串


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 4M

Author:
Problem type
Allowed languages
C++

翻转字符串

反转一个字符串 要求通过原地修改输入数组,不能借助额外的数组进行处理。

示例 1:
输入:
hello
输出:
olleh
示例 2:
输入:
Hannah

输出:

hannaH
约束条件:

\(1 \le s.length \le 10^5\)
s[i] 是可打印的 ASCII 字符。


Comments

There are no comments at the moment.