合併排序(Merge Sort)

Divide and Conquer

合併排序使用分治法
1️⃣ 將陣列不斷分成左右兩半
2️⃣ 個別排序後再合併成有序陣列

✅ 時間複雜度:O(n log n)