### Question:
ArrayEditDistance { public static <Type> int indel(Type[] first, Type[] second) { int i, j; int[][] A = new int[first.length + 1][second.length + 1]; A[0][0] = 0; for (j = 1; j <= second.length; ++j) { A[0][j] = A[0][j - 1] + 1; } for (i = 1; i <= first.length; ++i) { A[i][0] = A[i - 1][0] + 1; for (j = 1; j <= second.length; ++j) { if (first[i - 1].equals(second[j - 1])) { A[i][j] = A[i - 1][j - 1]; } else { A[i][j] = Math.min(A[i - 1][j] + 1, A[i][j - 1] + 1); } } } return A[first.length][second.length]; }  static int indel(Type[] first, Type[] second); static int levenshtein(Type[] first, Type[] second); static int DL(Type[] first, Type[] second); static int distance(Type[] first, Type[] second, 
            EditDistanceType type);  }### Answer:
@Test public void testIndelDistance() { System.out.println("indelDistance"); Object[] first = {'p','a','t','a','t','a'}; Object[] second = {'a','p','t','a'}; int expResult = 4; int result = ArrayEditDistance.indel(first, second); assertEquals(expResult, result); }