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.
With the indices i < j < k, the numbers must be non-descending (e.g. 1, 4, 2 should not be considered a triplet). You can't just pick the three numbers from anywhere in the array.
The "corner case" with r = 1
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 →
Things to consider for this problem: