Train Partner
Rahul and Rashi are off to the wedding of a close relative. This time they have to travel without their guardians. Rahul got very interested in the arrangement of seats inside the train coach. The entire coach could be viewed as an arrangement of consecutive blocks of size 8. Berth Number Compartment 1 - 8 1 9 - 16 2 17 - 24 3 ... and so on Each of these size-8 blocks are further arranged as:
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