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.
{4,3,3} is NOT a subarray of the input array. Subarrays are contiguous. Does anyone proofread these before they are posted?
I'd vent more but this page appears to not have been tested on Safari. FFS. Ignore all text bdlow this that I can't access when editing.
3
Explanation 0
We choose the following multiset of integers from the array: . Each pair in the multiset has an absolute difference (i.e., and ), so we print the number of chosen integers, , as our answer.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
For Sample Input 0
6 4 6 5 3 3 1
{4,3,3} is NOT a subarray of the input array. Subarrays are contiguous. Does anyone proofread these before they are posted?
I'd vent more but this page appears to not have been tested on Safari. FFS. Ignore all text bdlow this that I can't access when editing.
3 Explanation 0 We choose the following multiset of integers from the array: . Each pair in the multiset has an absolute difference (i.e., and ), so we print the number of chosen integers, , as our answer.