You are given N building and the height for each Building is denoted by hi.
For each building calculate the max_reach for a building. To calculate the max_reach:
1