摘要:
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example:Input: 第二种方法的解决代码 阅读全文
posted @ 2019-04-06 16:57
GoodRnne
阅读(807)
评论(0)
推荐(0)
摘要:
一、红黑树的定义: (1)根节点是黑色的, (2)所有叶子节点上不存储数据,并且颜色都为黑色。 (3)红色节点相邻的节点不能为红色。(红色节点邻居节点只能是黑色节点) (4)每一个节点,从该节点到达可达叶子节点的所有路径都包含了相同数量的黑色节点。 图示例子 红黑树的时间复杂度为O(log n)。由 阅读全文
posted @ 2019-04-06 12:41
GoodRnne
阅读(1030)
评论(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 @ 2019-04-06 10:42
GoodRnne
阅读(177)
评论(0)
推荐(0)
浙公网安备 33010602011771号