How to speed up external merge sort in Java

后端 未结 4 1409
忘掉有多难
忘掉有多难 2021-01-21 05:02

I am writing code for the external merge sort. The idea is that the input files contain too many numbers to be stored in an array so you read some of it and put it into files to

4条回答
  •  花落未央
    2021-01-21 05:53

    You are sorting integers so you should check out radix sort. The core idea of radix sort is that you can sort n byte integers with n passes through the data with radix 256.

    You can combine this with merge sort theory.

提交回复
热议问题