Sujet : Re: program to remove duplicates
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 22. Sep 2024, 03:06:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vcnu3p$1vkui$2@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.160 (Toresk; )
On Sun, 22 Sep 2024 00:18:09 +0200, fir wrote:
... you just need to read all files in
folder and compare it byte by byte to other files in folder of the same
size
For N files, that requires N × (N - 1) ÷ 2 byte-by-byte comparisons.
That’s an O(N²) algorithm.
There is a faster way.