← All problemsSign in

Travelling Together

Professor Verma and Professor Sharma from Thapar University are visiting a number of colleges across India to deliver lectures on "Dynamic Advancements in Programming". Professor Verma received the itinerary of Professor Sharma and is matching it with his itinerary, trying to find longest duration for which they can talk. They are both ready to shorten/extend their stay at a particular college t

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