← All problemsSign in

Ilya and Sleep disorder

Ilya lives in the beautiful city of Bytes lying in a hilly terrain. She loves to ride her bicycle on the hills whenever she gets a chance to do so. There are check-posts located on the hill at a unit distance from each other. The height of the check posts is given in an array A. Ilya has to visit her aunt who lives N check-posts away. Being a hilly area, the terrain in between the check-posts i

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