编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。 public class Solution { public void ReverseString(char[] s) { char temp; int i = 0; int j = s.Length - 1; while (i<j) { temp = s[i]; s[i] = s[j]; s[j] = temp; i += 1; j -= 1; } } }