Driver program to test above function
int main ( ) { int hist [ ] = { 6 , 2 , 5 , 4 , 5 , 1 , 6 } ; int n = sizeof ( hist ) / sizeof ( hist [ 0 ] ) ; cout << " Maximum ▁ area ▁ is ▁ " << getMaxArea ( hist , n ) ; return 0 ; }