airPlane invader question...help me to solve this question

Revision en1, by vikash27, 2021-01-06 17:18:47

N plane has a starting position above ground level and a speed at which it is descending.the player has a gun and can shoot the one plane each second.the game ends when a plane is allowed to land.determine maximum planes that can be prevented from landing.

example:- startHeight = [1,3,5,4,8] descentRate = [1,2,2,1,2] output to this example is 4

CONSTRAINTS :- 1≤n≤10^5, 1≤startHeight[i]≤10^9, 1≤descentRate≤10^5

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vikash27 2021-01-06 17:18:47 501 Initial revision (published)