标签:ble http string etc 面试题 inf 试题 href 编程
题目描述
示例
Java代码
class Solution {
//思想:前后位置交换
public void reverseString(char[] s) {
//标记数组首
int left = 0;
//标记数组尾
int right = s.length-1;
//临时变量,初始化赋值为‘0‘
char temp=‘0‘;
while(left<=right){
temp = s[left];
s[left] = s[right];
s[right] = temp;
//自增
left++;
right--;
}
}
}
输出
标签:ble http string etc 面试题 inf 试题 href 编程
原文地址:https://www.cnblogs.com/jiyongjia/p/13252582.html