Maximum Zipline Area Between Trees

Trees are arranged in a straight line. Tree i is at position i and has height height[i].

Choose two trees i and j where i < j, and install a horizontal zipline between them. The usable zi...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: