@Test public void testIsPermutationOfEachOther() { Assert.assertTrue(assignment.isPermutationOfEachOther("abcd", "cdab")); Assert.assertFalse(assignment.isPermutationOfEachOther("abcd", "123")); }
public boolean isPermutationOfEachOther(String s, String t) { if (s.length() != t.length()) { return false; } return sort(s).equals(sort(t)); }
Assignment { public boolean isPermutationOfEachOther(String s, String t) { if (s.length() != t.length()) { return false; } return sort(s).equals(sort(t)); } }
Assignment { public boolean isPermutationOfEachOther(String s, String t) { if (s.length() != t.length()) { return false; } return sort(s).equals(sort(t)); }  }
Assignment { public boolean isPermutationOfEachOther(String s, String t) { if (s.length() != t.length()) { return false; } return sort(s).equals(sort(t)); }  String getLongestString(int n, List<String> inputs); boolean isPermutationOfEachOther(String s, String t); }
Assignment { public boolean isPermutationOfEachOther(String s, String t) { if (s.length() != t.length()) { return false; } return sort(s).equals(sort(t)); }  String getLongestString(int n, List<String> inputs); boolean isPermutationOfEachOther(String s, String t);  }