sir , can u please help me to understand the increasing subaaray? why we are using the " inc[i] = inc[i-1]+1 " ?
Increasing subarray
Hello @chandreshmaurya do you doubt in this line only?
See in this we will make the increasing array to calculate the increasing sequence till thay point.
For that we will calculate using this.
Take this example
1 6 8 9 3 4 6 5
inc array
1 2 3 4 1 2 3 1
sir, it’s now clear. but, i passed 3 test cases out of 4. i failed in 1 test cases. here is my code. please help me to find out my mistake --> https://ide.codingblocks.com/s/448564
sir, i did so. but instead os that, i’m getting “TLE” for test case 2.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.