Sara and her game
CodeChefOpen on judge ↗
Problem description. Sara is playing "Reach the Destination" game. She is standing on some random step and has to reach 1st step with minimum number of jumps. But she has to follow few rules to find her next step. If she is standing at Nth step then her next step can either be (N-1) or (N+1) or (N/3) (purely divisible by 3) step. Help Sara to reach 1st step with minimum number of jumps. Input I
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.
Sign in to chat with the tutor and save your progress.
Sign in to start