摘要: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2019-06-09 21:13 lpomeloz 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N 阅读全文
posted @ 2019-06-09 20:49 lpomeloz 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2019-06-09 17:36 lpomeloz 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2019-06-09 15:56 lpomeloz 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2019-06-09 15:21 lpomeloz 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2019-06-09 11:20 lpomeloz 阅读(109) 评论(0) 推荐(0) 编辑