Company: DevRev
Difficulty: medium
Largest Rectangular Mural Problem Description Imagine a wall made of n vertical stone slabs placed side by side. Each slab has a width of 1 unit, but their heights are different. You want to paint the largest possible rectangular mural (artwork) on this wall. What is the maximum area of the mural that can be painted on the slabs? Examples Example 1: Input: 8 4 1 5 3 3 2 4 1 Output: 10 Constraints Execution time limit: 0.5 seconds (cpp) Memory limit: 1 GB Input: integer n (The number of stone slabs) The heights of the n stone slabs will be provided on the next line. Guaranteed constraints (further details not fully visible in image)