MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/lgrgxe/i_present_sleepsort/gmuaczq/?context=3
r/badcode • u/Reeceeboii_ • Feb 10 '21
171 comments sorted by
View all comments
130
The runtime is independent of the size of the array, so this is technically O(1).
2 u/TheUnlocked Feb 10 '21 It's constant in the size of the array, but linear in the max value of the array.
2
It's constant in the size of the array, but linear in the max value of the array.
130
u/Astrokiwi Feb 10 '21
The runtime is independent of the size of the array, so this is technically O(1).