IncredibleThings

导航

2016年5月10日 #

LeetCode-Pascal's Triangle

摘要: 注意pascal's triangle 的定义 阅读全文

posted @ 2016-05-10 05:56 IncredibleThings 阅读(184) 评论(0) 推荐(0) 编辑

LeetCode-Path Sum

摘要: 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. For example: Given the below binary tree and sum ... 阅读全文

posted @ 2016-05-10 05:09 IncredibleThings 阅读(149) 评论(0) 推荐(0) 编辑

LeetCode-Minimum Depth of Binary Tree

摘要: 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 leaf node. /** * Definition for a binary tree ... 阅读全文

posted @ 2016-05-10 05:07 IncredibleThings 阅读(148) 评论(0) 推荐(0) 编辑

LeetCode-Balanced Binary Tree

摘要: 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 depth of the two subtrees of every node never differ... 阅读全文

posted @ 2016-05-10 05:06 IncredibleThings 阅读(140) 评论(0) 推荐(0) 编辑

LeetCode-Binary Tree Level Order Traversal II

摘要: 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 example: Given binary tree {3,9,20,#,#,15,7}, ... 阅读全文

posted @ 2016-05-10 05:05 IncredibleThings 阅读(107) 评论(0) 推荐(0) 编辑

LeetCode-Maximum Depth of Binary Tree

摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. /** * Definition for a binary tree ... 阅读全文

posted @ 2016-05-10 05:03 IncredibleThings 阅读(103) 评论(0) 推荐(0) 编辑

LeetCode-Binary Tree Level Order Traversal

摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree { 阅读全文

posted @ 2016-05-10 04:58 IncredibleThings 阅读(122) 评论(0) 推荐(0) 编辑