← All problemsSign in

Chef Climbs a Mountain

One day, Chef is planning to go for climbing a mountain. The mountain has many peaks with different heights, and those peaks are the checkpoints. There are $N$ checkpoints with their heights $A_1,A_2,A_3... A_N$. Chef wants to calculate the highest peak, so Chef starts moving from $A_1$ at every checkpoint he notes down the maximum height he has reached till then. You have to print the Chef'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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start