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.
- Sales by Match
- Discussions
Sales by Match
Sales by Match
Sort by
recency
|
221 Discussions
|
Please Login in order to post a comment
My 3 Python solutions - two O(n) and one O(n^2)
Python 3 solution:
My rust solution:
Python 1 liner: O(N)
Sort array then loop through to count pairs:
matches = 0 sortedSocks = sorted(ar)