Given an array of integers A .
A represents a histogram i.e A[i] denotes height of the ith histogram's bar. Width of each bar is 1.
Find the area of the largest rectangle formed by the histogram.
1 <= |A| <= 100000
1 <= A[i] <= 1000000000
The only argument given is the integer array A.
Return the area of largest rectangle in the histogram.
A = [2, 1, 5, 6, 2, 3]
A = 
The largest rectangle has area = 10 unit. Formed by A to A.
Largest rectangle has area 2.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.