內部排序中的歸並排序是在內存中進行的歸並排序輔助空間為O(n)外部歸並排序是將外存中的多個有序子文件合並成一個有序子文件將每個子文件中記錄讀入內存後的排序方法可采用多種內排序方法外部排序的效率主要取決於讀寫外存的次數即歸並的趟數因為歸並的趟數s=élogkmù其中m是歸並段個數k是歸並路數增大k和減少m都可減少歸並趟數應用中通過敗者樹進行多(k)路平衡歸並和置換選擇排序減少m來提高外部排序的效率
初始敗者樹
初始歸並段 R:
R:
R:
類似敘述題略
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/23191.html