← All problemsSign in

Travelling Nomad

Problem description. A traveler has to travel from a source to a destination along a straight path,the locations of which are given as s1 and d1. On his way he encounters N townships each consisting of any no of houses, all located along the straight path,the locations of which are given by t1,t2,.....tk. Each township must have at least a single house and no house can be in more than 1 townsh

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