Skip to content

hasCode solutions do not cover all the cases #1

@adjorno

Description

@adjorno

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions