http://www.nxcoding.com/archives/leetcode-daily-2145-count-hidden-arrays-using-prefix-sum