You are viewing a single comment's thread. Return to all comments →
Set.contains() checks hashcode, no sorting required, and it is O(1)
Pairs
You are viewing a single comment's thread. Return to all comments →
Set.contains() checks hashcode, no sorting required, and it is O(1)