http://www.nxcoding.com/archives/leetcode-daily-problem-1706-ball-fall-location