sorting lines of an enormous file.txt in java

后端 未结 6 1044
小蘑菇
小蘑菇 2020-12-10 16:08

I\'m working with a very big text file (755Mb). I need to sort the lines (about 1890000) and then write them back in another file.

I already noticed that discussion

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 16:50

    divide and conquer is the best solution :)

    divide your file to smaller ones, sort each file seperately then regroup.

    Links:

    Sort a file with huge volume of data given memory constraint

    http://hackerne.ws/item?id=1603381

提交回复
热议问题