if we found any value greater than our maximum height then append it to our ans thats mean the building can see sunset view, now our new maximum height will be the greater value and at last return ans ...