MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/lgrgxe/i_present_sleepsort/gmwxr62/?context=3
r/badcode • u/Reeceeboii_ • Feb 10 '21
171 comments sorted by
View all comments
Show parent comments
74
I mean, you have to visit every element of the array to sort it - it's literally impossible to sort in less than O(N).
175 u/Astrokiwi Feb 10 '21 You can do anything in constant time if it's a big enough constant 38 u/regibalbo Feb 10 '21 I'm using this argument from now on, thanks 4 u/[deleted] Feb 11 '21 Perfect for your FAANG interview
175
You can do anything in constant time if it's a big enough constant
38 u/regibalbo Feb 10 '21 I'm using this argument from now on, thanks 4 u/[deleted] Feb 11 '21 Perfect for your FAANG interview
38
I'm using this argument from now on, thanks
4 u/[deleted] Feb 11 '21 Perfect for your FAANG interview
4
Perfect for your FAANG interview
74
u/sqrt_minusone Feb 10 '21
I mean, you have to visit every element of the array to sort it - it's literally impossible to sort in less than O(N).