http://www.nxcoding.com/archives/leetcode-daily-2711-diagonal-distinct-values-difference