vikash27's blog

By vikash27, history, 9 months ago, In English

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

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it