
BFS
smallfish_yy
人最幸福的事之一就是把爱好变成自己的工作。
展开
-
Word Ladder
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a timeEach intermediate word m原创 2014-02-10 03:49:07 · 397 阅读 · 0 评论 -
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. Analysis: Recursive. Note that -1 is原创 2013-12-28 12:56:24 · 397 阅读 · 0 评论