### Question:
Rotate { public void rotate5(int[] nums, int k) { k %= nums.length; reverse(nums, 0, nums.length - 1); reverse(nums, 0, k - 1); reverse(nums, k, nums.length - 1); }  void rotate(int[] nums, int k); void rotate(int[] nums); void rotate2(int[] nums, int k); void rotate3(int[] nums, int k); void rotate4(int[] nums, int k); void rotate5(int[] nums, int k); void reverse(int[] nums, int start, int end);  }### Answer:
@Test void go5(){ Rotate rotate = new Rotate(); for (int i = 0; i < cases.size(); i++) { rotate.rotate5(cases.get(i),caseNums.get(i)); assertArrayEquals(results.get(i), cases.get(i)); } }