摘要: 题目描述:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.解题思路:分治方法。将K个List不断地分解为前半部分和后半部分。分别进行两个List的合并。... 阅读全文
posted @ 2015-05-14 17:54 scottwang 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set i... 阅读全文
posted @ 2015-05-14 17:14 scottwang 阅读(170) 评论(0) 推荐(0) 编辑