[LeetCode] Generate Parentheses 解题报告

摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((... 阅读全文
posted @ 2012-12-22 14:29 小刀初试 阅读(182) 评论(0) 推荐(0)

[LeetCode] Flatten Binary Tree to Linked List 解题报告

摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2012-12-22 11:38 小刀初试 阅读(168) 评论(0) 推荐(0)