I have one more approach to this. 1. Add those partitioned substrings to arrays. i.e., for both 's' and 't' 2. Then sort the arrays. 3. return arr1.equals(arr2) I know it is N.LogN (less efficient), but it is an interesting approach
@ashersamuel95820 күн бұрын
can't believe i didn't solve this during the contest. its basically anagrams problem if you consider the partitions :(