Largest Rectangle gave WA although logic seems to be correct.

Please release the test cases for the following problem or review my code.
Problem link–>

My code–>

Just to let you know, you can submit your solution here:

@sidhant007 Your code gives TLE.
Our test data generation solution:

I got it AC 0.25 seconds. ->,rajat1603
The test case is fine , and nice problem

Got AC, needed to use fast i/o and had an error in my recursion’s base case!