← All problemsSign in

Breaking the Fence

A wooden Fence is made up of $wooden planks$ each having $width$ of $1$ $meter$, but varying heights (in meters). Suppose there are $N$ wooden planks of varying heights . A rabbit named $Harry$ wants to cross the wooden fence. In order to make this possible you have to cut a $Rectangular$ or a $Square$ section of the wooden fence. Find out the $maximum$ area that can be cut to allow Harry to pass

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