01.12 · Problem
Longest Hill on the Trek
This problem is part of solulu Pro
A trekker has the elevation reading at each kilometre. A *hill* is a section of at least 3 points that strictly rises to a peak and then strictly falls. Return the length of the longest hill (0 if there is none).
Lifetime ₹2,000 ₹1,000 · Beta offer
Item 12 of 94 · updated 2026-10-12