(December 15, 2019 at 3:33 pm)Abaddon_ire Wrote:Once again, I see no reason to think you understand what you are talking about, in fact, I see every reason to think otherwise. Link to something you have made with SQL and explain how you made it.(December 15, 2019 at 1:41 pm)FlatAssembler Wrote: I wouldn't say it's stealing to continue someone's work. People who discovered an efficient algorithm don't own those algorithms, they existed before they were discovered in the same sense that the Pythagorean theorem existed before it was discovered: it exists in our world (and any world which approximately obeys the Euclidean Fifth Postulate) independently of whether it's discovered or not. And efficient sorting algorithms exist in all worlds in which a RAM machine is possible.
What do you mean you don't like Introsort? It's demonstrably the most efficient known algorithm for sorting large arrays that doesn't make assumptions about whether they are already partially or completely sorted.
Try writing SQL at the command line. Then get back to me.
I have no interest in doing your first year homework vicariously.
Anyway, I've modified the implementation of QuickSort in my own programming language to automatically measure the sortedness of the array before sorting it and print what would be the expected number of comparisons done by QuickSort according to the formula my genetic algorithm derived. From what I've seen, that formula usually overestimates the number of comparisons QuickSort will do on small arrays, sometimes by as much as two times. Of course, it works well for large arrays, because my genetic algorithm tweaked it using the measurements with large arrays.