GUVI
Back

codekatta-array1

Created 3 mons ago
Codekata
20 Views
1 Comments
MohamedMusthafa0ctwIa
@MohamedMusthafa0ctwIa
Followers
Following
Posts
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.
 
Habitate.io