Simulate pouring water onto terrain | Airbnb Interview Question