Rocket Race Easy

+50 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES BASH, C, C++, C# AND 20 MORE
    LANGUAGES BASH, C, C++, C#, CLOJURE, ELIXIR, ERLANG, GO, GROOVY, HASKELL, JAVA, JAVASCRIPT, JULIA, KOTLIN, NIM, PERL, PHP, PYTHON2, PYTHON, RUBY, RUST, SWIFT, TYPESCRIPT, VB
  • TIME ~10MIN

Rocket Race

Challenge outline

Hello and welcome to the challenge!


You are going to participate in algorithmic challenge designed to showcase your technical skills.


Rocket Race is an event organized every year in the Challenge Galaxy. This is the biggest event for rocket fans in the space. This year there is a long narrow tunnel on the race track. It is impossible for a rocket to overtake other rockets in the tunnel. Therefore, a rocket has to lower its speed if there is a slower rocket in front of it.


You are given the maximum speed of N rockets in the order they entered the tunnel during the race. Each rocket moves at its maximum speed if it can. If that's is impossible because of the rocket in front, it might have to lower its speed. For the purpose of this problem, you can assume that the tunnel is infinitely long.


Your assignment is to say how many rockets can move at their maximum speed in the tunnel.


Click "Start test" to get the details of the assignment.


Have fun and good luck! :)