2014年12月18日

摘要: Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root... 阅读全文
posted @ 2014-12-18 22:59 Yu's Garden 阅读(565) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be... 阅读全文
posted @ 2014-12-18 22:31 Yu's Garden 阅读(4661) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ ... 阅读全文
posted @ 2014-12-18 21:51 Yu's Garden 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Sum Root to Leaf Numbers Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-t... 阅读全文
posted @ 2014-12-18 21:27 Yu's Garden 阅读(623) 评论(0) 推荐(0) 编辑
摘要: Path SumGiven 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 give... 阅读全文
posted @ 2014-12-18 21:10 Yu's Garden 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 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 tr... 阅读全文
posted @ 2014-12-18 20:54 Yu's Garden 阅读(930) 评论(0) 推荐(0) 编辑
摘要: WordLadder解题报告Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only... 阅读全文
posted @ 2014-12-18 19:07 Yu's Garden 阅读(1079) 评论(2) 推荐(0) 编辑
摘要: N-Queens II (LEVEL 4 难度级别,最高级5)Follow up for N-Queens problem.Now, instead outputting board configurations, return the totalnumber of distinct solutio... 阅读全文
posted @ 2014-12-18 18:14 Yu's Garden 阅读(536) 评论(1) 推荐(0) 编辑
摘要: REF: http://blog.csdn.net/fightforyourdream/article/details/15333405题目是一道简单的小程序,像下面这样:[java] view plaincopypublic class Test1 { public static void mai... 阅读全文
posted @ 2014-12-18 17:51 Yu's Garden 阅读(654) 评论(0) 推荐(1) 编辑

导航