http://www.nxcoding.com/archives/leetcode-daily-2444-count-bounded-subarrays