Histogram area calculation

What’s wrong in the code??

@rockstarpkm
Use long long int everywhere, totat area can’t exceed 10^9. Also starting maxArea should be -1*pow(10,18)