My java Solution, easy to understand


  • 0
    Z
            char[] a = s.toCharArray();
            char[] b = t.toCharArray();
            
            Arrays.sort(a);
            Arrays.sort(b);
            
            return Arrays.equals(a,b);
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.