You are viewing a single comment's thread. Return to all comments →
static boolean isAnagram(String a, String b){
if(a.length()!=b.length()){ return false; } char[] a1=a.toLowerCase().toCharArray(); char[] b1=b.toLowerCase().toCharArray(); java.util.Arrays.sort(a1); java.util.Arrays.sort(b1); if(java.util.Arrays.equals(a1,b1)){ return true; } return false; }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Anagrams
You are viewing a single comment's thread. Return to all comments →
static boolean isAnagram(String a, String b){