externalsortinginjava icon indicating copy to clipboard operation
externalsortinginjava copied to clipboard

Randomizer

Open tkram01 opened this issue 4 years ago • 3 comments

Could this be modified to randomize huge files instead of sort them much like "sort -R" does?

tkram01 avatar Apr 23 '20 20:04 tkram01

Yes. The sort of the blocks should become a shuffle and then we need some slightly tricky merge process (not hard but it needs to be done well).

If you are interested, I can help with the algorithm.

It is probably about 20, 30 lines of code in the end.

lemire avatar Apr 23 '20 21:04 lemire

Yes - I'm happy to work on it with some guidance on the merge process. Thanks!

tkram01 avatar Apr 23 '20 21:04 tkram01

@tkram01 Great. So I suggest you start by forking the project. Create a new class that looks like the existing sorted, give it a good name. Then ping me (just write @lemire in an issue within your fork).

lemire avatar Apr 23 '20 21:04 lemire