← All problemsSign in

Flying Cabs

Now there is a trend of flying cabs comming. But the technology is under development and the cabs can only move forward or backward a fix number of steps $x$. There are $N$ stations(where the cab needs to stops to board and unboard passengers). All the stations are in a straight line. For each valid $i$, The $i$-th station is located at $A$$i$ position. If Cab is at a location $R$, then it can m

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start