0 like 0 dislike
265 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 (19,470 points) | 265 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.