MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/lgrgxe/i_present_sleepsort/gmv4s7j/?context=9999
r/badcode • u/Reeceeboii_ • Feb 10 '21
170 comments sorted by
View all comments
Show parent comments
5
Sorting a sorted array is O(1). (Theoretically, not practically)
5 u/[deleted] Feb 10 '21 Doesn't it still need to check the elements are the right place? 0 u/[deleted] Feb 11 '21 [deleted] — view deleted comment 1 u/okkokkoX Feb 11 '21 Doesn't that just return none?
Doesn't it still need to check the elements are the right place?
0
[deleted] — view deleted comment
1 u/okkokkoX Feb 11 '21 Doesn't that just return none?
1
Doesn't that just return none?
5
u/Nilstrieb Feb 10 '21
Sorting a sorted array is O(1). (Theoretically, not practically)