Reverse character array @param values character array @param from begin index of given array @param to end index of given array
(char[] values, int from, int to)
| 51 | * @param to end index of given array |
| 52 | */ |
| 53 | public static void reverse(char[] values, int from, int to) { |
| 54 | while (from < to) { |
| 55 | char temp = values[from]; |
| 56 | values[from] = values[to]; |
| 57 | values[to] = temp; |
| 58 | from++; |
| 59 | to--; |
| 60 | } |
| 61 | } |
| 62 | } |
no outgoing calls