Mountain Engineering
CodeChefOpen on judge ↗
A sequence in which the value of elements first increase and then decrease is called Mountain- Sequence. In a valid Mountain-Sequence there should be at least one element in the increasing and at least one element in the decreasing arm. For example, "1 3 5 9 17 12" is a valid Mountain-Sequence having five elements in the increasing arm namely 1, 3, 5, 9 and 17, and 1 element in the decreasing arm
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