开启字符串第一题
public void reverseString(char[] s) {
int i=0,j=s.length-1;
while(i<j){
char temp=s[i];
s[i]=s[j];
s[j]=temp;
i++;
j--;
}
}
开启字符串第一题
public void reverseString(char[] s) {
int i=0,j=s.length-1;
while(i<j){
char temp=s[i];
s[i]=s[j];
s[j]=temp;
i++;
j--;
}
}