← All problemsSign in

Bumbling Binks

Luke Skywalker has to reach the Death Star to prevent the destruction of another planet and thwart Darth Vader. But Jar Jar Binks has somehow managed to screw up his hyperdrive! So, he is forced to go to each planet on the way to refuel. The amount of fuel required to go from planet number 'n' to the next planet (n+1) is given by the function f , f(2n) = f(n), f(2n+1) = f(2n)+1 and f(1) = 1.Assumi

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