Open ErrorDAR32 opened 4 years ago
Hey, do you have the original python version I can look at?
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
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!