14 merge sort
divide and conquer,除了最基本的排序以外,还能有其他的考法。
L64 Merge Sorted Array (88 Merge Sorted Array)
23 Merge K sorted Lists (L104)
21 Merge Two sorted Lists (L165)
Other related:
L249 Count of Smaller Number before itself (can use segment tree, Binary Index Tree (Fenwick tree), BST做)
315 Count of Smaller Numbers After Self(can use segment tree, Binary Index Tree (Fenwick tree), BST做)
L532 Reverse Pairs (493)
Last updated