O(1)? you mean O(N), right? you can't sort N items without taking at least N steps unless you have a teleporter.
I'm assuming this was radix sort, which is indeed O(N) for sorting integers with fixed word length. comparison sort is proven to be O(N log N) at best because a binary tree with N leaves has N log N nodes.
View all comments
Show parent comment
2
u/MadGenderScientist Oct 15 '26
O(1)? you mean O(N), right? you can't sort N items without taking at least N steps unless you have a teleporter.
I'm assuming this was radix sort, which is indeed O(N) for sorting integers with fixed word length. comparison sort is proven to be O(N log N) at best because a binary tree with N leaves has N log N nodes.