541. Reverse String II
2017-04-17 本文已影响0人
Genejing
学到一种新的将数组reverse的方式。
while(start<end) {
temp = array[start];
array[start++] = array[end];
array[end--] = temp;
}
学到一种新的将数组reverse的方式。
while(start<end) {
temp = array[start];
array[start++] = array[end];
array[end--] = temp;
}