Search For Treasure
CodeChefOpen on judge ↗
You are moving from cities to cities in search of a treasure. There are N cities numbered from 0 to N-1. Initially you are at city no. 0 and Treasure you are looking for is at city number N-1. Each city is connected to two cities directly except for city number 0 and city number N-1 wich are connected to only one city directly. 0-->1-->2-->3-->4........-->N-1 As the journey from a city to anot
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