0 like 0 dislike
125 views
1<=A[i]<=1000000

1<=N<=100000

 Eg- {10,1,9,9}

K = 3

Output : 3 , as this subarray : {1,9,9} , when you insert K in it , it becomes the 2nd largest element of this subarray . Also , this was the largest subarray possible .
in Algorithms and Problems by Expert (15,650 points) | 125 views

Please log in or register to answer this question.