GUVI
Back

codekatta-array1

Created 2 years ago
42 Views
1 Comments
MohamedMusthafa0ctwIa
@MohamedMusthafa0ctwIa
MohamedMusthafa0ctwIa
@MohamedMusthafa0ctwIaProfile is locked. Login

Assume you are a student studying in school.You are given a task to find first negative integer for each and every window of size k.

Input Description:
First line contains an integer n denoting the size of the array. The next line contains n space separated integers forming the array. The last line contains the window size k.

Output Description:
Print the first negative integer in that window.If all the numbers are positive print 0

Sample Input :
7
1 -2 -3 -4 5 6 -7
3
Sample Output :
-2 -2 -3 -4 -7

i couldnt understand the question...please explain the question..how window size will be in negative...

Comments
Please login to comment.
 
Powered by habitate.io Habitate