### Question:
A1 { public static Integer[] go(Integer[] arrays, Integer target) { Integer first = null; Integer second = null; boolean isFirstAlready = false; for(int i = 0;i < arrays.length; i++){ if(isFirstAlready){ if(arrays[i] > target){ second = i - 1; break; } }else{ if(arrays[i].equals(target)){ first = i; isFirstAlready = true; } } } return new Integer[]{first,second}; }  static Integer[] go(Integer[] arrays, Integer target);  }### Answer:
@Test void go() { long starTime = System.currentTimeMillis(); for (int i = 0; i < cases.size(); i++) { Integer[] result = A1.go(cases.get(i), keys.get(i)); assertEquals(results.get(i)[0], result[0]); assertEquals(results.get(i)[1], result[1]); } System.out.println("测试通过，花费时间：" + (System.currentTimeMillis() - starTime) + "ms"); }