In Count Subarrays problem why they did not take A[1,4] , A[1,3] , A[1,2,3] ,A[2,3,4] as Non decreasing Subarray in example A[1 4 2 3] because the have taken A[1,2] and A[3,4] as Non decreasing Subarray
Please explain what is subarray and what is non decreasing subarray for a given array
subarray means choose a starting point and ending point in an array and take all elements you found in between… and non decreasing means it should either increase or stay constant…
in 9 1 2 3 3 3 5 11 9
the non decreasing subarray is 1 2 3 3 3 5 11
i found answer of this question (or answer, That i Needed) Here CLICK HERE