14 merge sort

divide and conquer,除了最基本的排序以外,还能有其他的考法。

L64 Merge Sorted Array (88 Merge Sorted Array)

L6 Merge Two Sorted Arrays

23 Merge K sorted Lists (L104)

21 Merge Two sorted Lists (L165)

L486 Merge K sorted Arrays

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