You are viewing a single comment's thread. Return to all comments →
Your solution is good but there is a simpler O(nlogn) solution that does not need a map.
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Pairs
You are viewing a single comment's thread. Return to all comments →
Your solution is good but there is a simpler O(nlogn) solution that does not need a map.