PrefixHamming { public static int distance (String str1, String str2){ return distance(Transformations.convertStringToIntArray(str1),Transformations.convertStringToIntArray(str2)); }  static int distance(String str1, String str2); static int distance(int[] str1, int[] str2);  }
@Test public void test1(){ String str1 = "kitten"; String str2 = "sitting"; int res = PrefixHamming.distance(str1,str2); Asserts.assertEquals(res, 3); }
@Test public void test2(){ String str1 = "cooked"; String str2 = "cooking"; int res = PrefixHamming.distance(str1,str2); Asserts.assertEquals(res, 3); }
@Test public void test3(){ String str1 = "running"; String str2 = "swimming"; int res = PrefixHamming.distance(str1,str2); Asserts.assertEquals(res, 8); }