How to find common strings among two very large files?

后端 未结 8 1881
天涯浪人
天涯浪人 2021-02-06 07:08

I have two very large files (and neither of them would fit in memory). Each file has one string (which doesn\'t have spaces in

8条回答
  •  囚心锁ツ
    2021-02-06 07:17

    Is there any order to the data in the files? The reason I ask is that though a line by line comparison would take an eternity, going through one file line by line whilst doing a binary search in the other would be much quicker. This can only work if the data is sorted in a particular way though.

提交回复
热议问题