Update trap rain water

find the max and do two ways towards the max