Cannot understand the histogram problem

How to find the single integer denoting area of the rectangle using array elements. Please explain with the example.

do u want me to explain the qn?
or the soln approach with an e.g?

Both the question and approach to solve the question

the value in the array represents the heights of the bar with width 1 unit
so u have to find the max rect. area that exists inside that histogram

brute force:
for ( int i=0;i<n; ){
for(int j=i+1;j<n; ){
if
jth value is <= ith value i.e rect. can form
update the area and store the max area
else
break;
}
}

better approach exists for this qn
for soln pls see the video first
becoz it is very difficult to explain it

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.