John Snow and Khalesi
CodeChefOpen on judge ↗
Problem description. John Snow and Khalesi like each other.Due to some reasons John Snow had to travel to state 'S' of the country.There are 'N' states in the country and Khalesi is at state 1. .The states are connected to each other.She is desperate to meet John who is at state 'S'. Help her reach him in minimum steps.For example : If John is at state 3, and state 1 is connected to state 2 and s
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