You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example,
XOR solution will fail on test cases like this:
7
trees bike cars steer arcs arrrcs carrrs
The reason is that hash code of "arcs" and "arrrcs" is the same and they are not anagrams. You should not keep hash code as a key of your HashMap because of collisions.
The text was updated successfully, but these errors were encountered:
For example,
XOR solution will fail on test cases like this:
7
trees bike cars steer arcs arrrcs carrrs
The reason is that hash code of "arcs" and "arrrcs" is the same and they are not anagrams. You should not keep hash code as a key of your HashMap because of collisions.
The text was updated successfully, but these errors were encountered: