I wanted to know how can I compare two rearranged strings
E.g if String a=”string” ,String b=”tsrngi” … If I compare a.equals(b), It will return false because of order of characters… I want it to return true because characters are same but only order is different.. Thanks
I wanted to know how can I compare two rearranged strings E.g if String
Share
Sort them, then compare. To sort, use something like: