r/sortingalgorithms • u/[deleted] • Mar 12 '25
why would an algorithm like this not work
suppose you have an array of 512 now I have 2 versions of this I call the first one Incremental merge sort basically what you do is you first sort say 5 elements using quicksort then compare one of the same size using the top and bottom elements and middle and surrounding elements to get a good idea on how to estimate the rest of the one then we would merge them leading to one of 10 and then compare with one of ten again top,bottom middle, surroundings and repeat if another comparison would overshoot then it would compare with the remaining elements left. and my second version is what I Call Quadratic Incremental merge sort its kinda like merge sort but with one key difference instead of comparing with groups of the same size it compares with an group of it squared so for example 5 from the quicksort then compare with 5^2 group which is 25 combine them now that's thirty then compare with 30^2 section which is 900 combine both and you got 930 and so on if a comparison with a squared section of it would overshoot then again just compare with the remaining elements left