@@ -0,0 +1,786 @@
+package codingbat.array1;%0A%0A/*%0A * Given an int array length 3, if there is a 2 in the array immediately %0A * followed by a 3, set the 3 element to 0. Return the changed array. %0A * %0A * fix23(%7B1, 2, 3%7D) = %7B1, 2, 0%7D%0A * fix23(%7B2, 3, 5%7D) = %7B2, 0, 5%7D%0A * fix23(%7B1, 2, 1%7D) = %7B1, 2, 1%7D%0A */%0A%0Apublic class Fix23Test %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A%0A    Fix23Test test = new Fix23Test();%0A%0A    System.out.println(%22%3E%22 + test.fix23(new int%5B%5D %7B1, 2, 3%7D) + %22%3C%22);%0A    System.out.println(%22%3E%22 + test.fix23(new int%5B%5D %7B2, 3, 5%7D) + %22%3C%22);%0A    System.out.println(%22%3E%22 + test.fix23(new int%5B%5D %7B1, 2, 1%7D) + %22%3C%22);%0A  %7D%0A%0A  public int%5B%5D fix23(int%5B%5D nums) %7B%0A    for (int i = 1; i %3C nums.length; i++) %7B%0A      if (nums%5Bi%5D == 3 && nums%5Bi - 1%5D == 2) %7B%0A        nums%5Bi%5D = 0;%0A      %7D%0A    %7D%0A%0A    return nums;%0A  %7D%0A%0A%7D%0A

add task fix23