Company: Buyhatke_15july
Difficulty: medium
Tan and Test Cases Problem Description Tan is creating test cases for an array based problem. He has so generated N non-negative integers. He successfully created those arrays and send them to his reviewer Tanu for acceptance. We all know the nature of test-cases changes! Tanu has given him a task, he will pick a range [L, R] (both inclusive) and add a value K to those array elements. After doing this, the 2nd reviewer Shubhanshu will now also change some values in the array formed. First, he will inverse the array formed, and then he will pick a range [L, R] (both inclusive) and subtract K from all the values in that range. Since we are now ready with the test cases, here comes the question: You have to find the length of all non-decreasing subarray. If two subarray has the same length we will merge that subarray in sorted order and again repeat the above process until we cannot merge any two subarrays. You have to print the least number of subarray we can have and follow by the size