You are viewing a single comment's thread. Return to all comments →
yes for example this is way easier to understand for some reason this did not pop to mind
I wonder this is still faster for larger data sets
(sayanarijit)
static boolean isAnagram(String a, String b) { char[] ca = a.toLowerCase().toCharArray(); char[] cb = b.toLowerCase().toCharArray(); Arrays.sort(ca); Arrays.sort(cb); return (new String(ca)).equals(new String(cb)); }
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 →
yes for example this is way easier to understand for some reason this did not pop to mind
I wonder this is still faster for larger data sets
(sayanarijit)