dfs
StevenIsSnail
辛苦理所当然。年轻就拼搏。挑战不确定。
展开
-
【数据结构_二叉树+dfs】
Flatten Binary Tree to Linked List Total Accepted: 17814 Total Submissions: 64054My Submissions Given a binary tree, flatten it to a linked list in-place. For example, Given 1原创 2014-08-02 23:15:45 · 590 阅读 · 1 评论 -
【图\树的BFS\DFS】 Word Ladder II (MinPath)、Surrounded Regions 、Add Next pointer in tree、zigzag bfs Tree
Word Ladder II Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be changed at a timeEach原创 2014-08-01 21:35:31 · 732 阅读 · 1 评论 -
【两类dfs总结】 Restore IP Addresses、Word Search、Subsets、带重复的全排列
Restore IP Addresses Total Accepted: 11457 Total Submissions: 56215My Submissions Given a string containing only digits, restore it by returning all possible valid IP address combinations原创 2014-08-02 00:01:07 · 869 阅读 · 2 评论 -
【树形dp】Binary Tree Maximum Path Sum
Binary Tree Maximum Path Sum Total Accepted: 14936 Total Submissions: 75024My Submissions Given a binary tree, find the maximum path sum. The path may start and end at any node in the tr原创 2014-08-01 22:59:16 · 852 阅读 · 0 评论