摘要:
1、 Sort a linked list using insertion sort. Given 1->3->2->0->null, return 0->1->2->3->null. 2、 阅读全文
摘要:
1、 Given a binary search tree and a new tree node, insert the node into the tree. You should keep the tree still be a valid binary search tree. Given 阅读全文
摘要:
1、 给出一个无重叠的按照区间起始端点排序的区间列表。 在列表中插入一个新的区间,你要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。 插入区间[2, 5] 到 [[1,2], [5,9]],我们得到 [[1,9]]。 插入区间[3, 4] 到 [[1,2], [5,9]],我们得 阅读全文