Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Well... I, being a lazy person, would make three scripts. The first is to read the source file by 100'000 records, sort and write to separate files. The second is to take two files, merge them with sorting into one, until one sorted file remains. The third is to read two already sorted files and output the difference between them.
If we talk about abstract data, then I see nothing but bypassing the loop and comparing line by line. If you need to compare several different files with each other, then of course it would be nice to somehow sort / split them into block files first. The php.net/function.fgetcsv \ php.net/function.fputcsv
functions might come in handy .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question