Skip to content

dbrn/towerjump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

towerjump

Problem statement Jack is playing a 2D game. In that, there are N towers aligned in a straight horizontal line from left to right. Jack has to move from right to left by jumping. He can jump over K towers provided they all are shorter than or equal to the current tower. Find the value of K for each tower. Input First line contains an integer T specifying the number of test cases. Second line contains an integer N specifying the number of towers. Third line contains n space separated integers(H[i]) denoting the height of each tower. Output Print the value K for each tower separated by a space. Explanation: For 7th term there are 5 tower smaller than itself. Similarly for 6th there are 3 towers. Constraint 1 <= T <= 10 2 <= n <= 10^6 1 <= H[i] <= 10^8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages