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.
@manndras
I highly recommend that you read the editorial!
You seem like the guy who would enjoy it.
The left map/right map solution he mentions is O(n) (think there's a typo since the poster called it nlgn).
Anyways, its actually even simpler than what you have (not to say that your explanations weren't helpful; they were!).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Count Triplets
You are viewing a single comment's thread. Return to all comments →
@manndras I highly recommend that you read the editorial! You seem like the guy who would enjoy it. The left map/right map solution he mentions is O(n) (think there's a typo since the poster called it nlgn). Anyways, its actually even simpler than what you have (not to say that your explanations weren't helpful; they were!).