https://oj.leetcode.com/problems/triangle/