Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,323 views

in Online Assessments by Expert (108,110 points) | 1,323 views

1 Answer

0 like 0 dislike
Best answer
Given an array find the number of good subarrays.

Good subarray is an array such that when it is removed rest of the array is strictly increasing

-> [1 2 3 4 0 5]

-> [0] ; [0,5] ; [4 0] ; [4 0 5 ] ; [3 4 0] ; [3 4 0 5] ; [2 3 4 0] ; [2 3 4 0 5] ; [1 2 3 4 0] ; [1 2 3 4]

-> 10

Vid Solution.->
by Expert (108,110 points)
edited by