Stack histogram area problem?

how to do this problem using divide and conquer ?

hello @mehulbhandari358

read this->

i checked it . it is not there . they have used trees

@mehulbhandari358
to find min efficiently u need to use segement tree.
no other way to achieve it efficiently.

but the logic they have explained is divide and conquer only

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.

but they have done it using trees ?
is there any way of doing it without trees ,simply using divide and conquer ?