SortingVisualizer icon indicating copy to clipboard operation
SortingVisualizer copied to clipboard

Adding new mergeStrat variant

Open ErrorDAR32 opened this issue 4 years ago • 2 comments

see https://github.com/ErrorDAR32/SortingVisualizer for the new variant this variant that i called doubly (any similarity with any other merge sort in existence is purely coincidence) basically divides the merge space into 4 sublists with the help of 3 pointers those four being (in order) the sorted list, the first mergeable list, the workspace, and the second mergeable list, and compares the first items of the last 3 to en up with a merged array.

I tried to comply as much as possible with your style and requirements to integrate the merge variant, but i have probably failed miserably in some pretty stupid way, i had to port the code from python and i dont know that much c++, i also dont know how to compile your project so i couldnt test it properly, if any error can be signaled for correction would be cool, and eventually merge the variant if you like it would be cooler!

ErrorDAR32 avatar Jul 15 '20 03:07 ErrorDAR32

Hey, do you have the original python version I can look at?

w0rthy avatar Jul 15 '20 04:07 w0rthy

Yes, it is right here. It was part of some sorting challenges i put to myself to make a better merge in place, i may or may not have been inspired by your videos :P

ErrorDAR32 avatar Jul 15 '20 08:07 ErrorDAR32