Minimum Walk
CodeChefOpen on judge ↗
Chef Misha and her friend Nishchith are playing a game. They face each other and there is an array between them. The flow of the game is as follows : The Head Chef Tsu picks a random number K from the array and the one who can reach K. Step counting is carried out as follows: For example: if given array is [ 2, 2, 3, 5, 1, 3, 3, 6 ] and Chef Tsu picks 1. Consider Misha is on the Left of the array
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