Strongest fighter (daily code)


There is a group of MMA fighters standing together in a line. Given the value of their strengths, find the strength of the strongest fighter in continuous sub-groups of size k.

Input Format

First line contains an integer N, the number of fighters Followed by N integers where i’th integer denotes the strength of i’th fighter. Next line contains the size of sub-group k

Constraints

1<=N<=10^5
1<=k<=N
1 <= Ai <= 100000


my code work fine but fail in some test case

hey @aattuull,array size can be upto 10^5 but you have taken it of size 100.change array size and try to submit.

1 Like

thanks …now it is submit successfully .
i forget to change the size of array :sweat_smile:

@aattuull its good to know you had solved your doubt.could you please mark this doubt as resolved if you dont have any queries more.