We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Simple and straight-forward O(n) solution. After nextInt the nextLine is used else our scanner reads the buffer left after reading the number of pairs as first pair.
Java Hashset
You are viewing a single comment's thread. Return to all comments →
Simple and straight-forward O(n) solution. After nextInt the nextLine is used else our scanner reads the buffer left after reading the number of pairs as first pair.