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.
Hey excellent solution. I initially sorted the array and continued with the logic mentioned above. But two of the test cases fail. I'm using Collections.sort to sort the array. I'm unable to catch as to why the logic would fail if the list is sorted
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 →
Hey excellent solution. I initially sorted the array and continued with the logic mentioned above. But two of the test cases fail. I'm using Collections.sort to sort the array. I'm unable to catch as to why the logic would fail if the list is sorted