News for hackers. Stuff that matters.
Re:Visualizing and exploring sorting algorithms in two dimen... by mrami on Saturday July 27, 2019 @10:39AM (#20542213)
I'm not sure what conditions you have in mind, but in the selection sort, the comparisons are O(n^2), and the assignments are O(n).

If comparisons are a fixed, non-zero cost, and assignments are a fixed, non-zero cost, then the comparisons in your selection sort will always overwhelm the assignments, and I can tell you at exactly which input size.

https://gist.github.com/mrami4/56d6e234f34787b8c5daf543a299a...

There are no comments on this comment yet.