Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .

0 like 0 dislike
2,621 views

in Online Assessments by Expert (144,450 points)

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 (144,450 points)
edited by
...