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.
- Picking Numbers
- Discussions
Picking Numbers
Picking Numbers
Sort by
recency
|
181 Discussions
|
Please Login in order to post a comment
It should in the question that the array needs to be sorted. Or we should have been asked to find a 'subsequence' and not a 'subarray'.
def pickingNumbers(a): # Write your code here
python 3
Test cases are wrong. e.g. For input array [4 6 5 3 3 1] it is saying expected subarray length is 3.
Can owner specify which 3 elements have difference less than or equal to 1.
c++, with debug. iMid - it is where the diff is equal to 1, but still goes on: