摘要:
Pascal's triangle (1过) Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return 给定一个非负整数 numRows,生成杨辉三角的 阅读全文
posted @ 2019-03-20 18:35
twoheads
阅读(177)
评论(0)
推荐(0)
摘要:
三角形最小路径和 (1过) 给定一个三角形,找出自顶向下的最小路径和。每一步只能移动到下一行中相邻的结点上。 例如,给定三角形: 自顶向下的最小路径和为 11(即,2 + 3 + 5 + 1 = 11)。 说明: 如果你可以只使用 O(n) 的额外空间(n 为三角形的总行数)来解决这个问题,那么你的 阅读全文
posted @ 2019-03-20 17:11
twoheads
阅读(123)
评论(0)
推荐(0)
摘要:
109. 有序链表转换二叉搜索树 Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 给定一个单链表,其中的元素按升序排序,将其转换 阅读全文
posted @ 2019-03-20 15:47
twoheads
阅读(191)
评论(0)
推荐(0)
摘要:
balanced-binary-tree (1过) Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a bin 阅读全文
posted @ 2019-03-20 10:58
twoheads
阅读(121)
评论(0)
推荐(0)

浙公网安备 33010602011771号