Using unordered set and hashcode.