0 like 0 dislike
889 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 (118,070 points) | 889 views

Please log in or register to answer this question.