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.
The common definition of a subarray consists of a list of contiguous elements within an arary. The problem statement is inconsistent with the test cases. I coded a solution considering an unordered array of integers and failed nearly all test cases. However, after I pre-sorting the array 'a' I immediately passed the test cases.
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
The common definition of a subarray consists of a list of contiguous elements within an arary. The problem statement is inconsistent with the test cases. I coded a solution considering an unordered array of integers and failed nearly all test cases. However, after I pre-sorting the array 'a' I immediately passed the test cases.