摘要:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
posted @ 2015-07-14 22:29
gqtc
阅读(95)
评论(0)
推荐(0)
摘要:
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思路:要快速找到k个元素中的最小值,使用堆这种数据结构。找到最小值后,还需要知道该最小值出自哪个链表, 阅读全文
posted @ 2015-07-14 17:50
gqtc
阅读(118)
评论(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 is: " 阅读全文
posted @ 2015-07-14 11:32
gqtc
阅读(93)
评论(0)
推荐(0)

浙公网安备 33010602011771号