MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/eluz97/visualizing_bubble_sort/fdku7ta/?context=3
r/Python • u/thebuffed • Jan 08 '20
73 comments sorted by
View all comments
11
[removed] — view removed comment
4 u/NumerousInMyUterus Jan 08 '20 Whats even the runtime of BOGO? Wouldnt that be something like n! ? 4 u/[deleted] Jan 08 '20 On average Bogo sort is O(n*n!) but there isn't a guaranteed convergence 3 u/[deleted] Jan 08 '20 [removed] — view removed comment 2 u/[deleted] Jan 08 '20 Yeah technically it could be done in O(n) if the list is already in order but that defeats the purpose of this exercise 1 u/Cruuncher Jan 09 '20 Technically it can be done in O(n) from any order of you get really lucky.Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
4
Whats even the runtime of BOGO? Wouldnt that be something like n! ?
4 u/[deleted] Jan 08 '20 On average Bogo sort is O(n*n!) but there isn't a guaranteed convergence 3 u/[deleted] Jan 08 '20 [removed] — view removed comment 2 u/[deleted] Jan 08 '20 Yeah technically it could be done in O(n) if the list is already in order but that defeats the purpose of this exercise 1 u/Cruuncher Jan 09 '20 Technically it can be done in O(n) from any order of you get really lucky.Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
On average Bogo sort is O(n*n!) but there isn't a guaranteed convergence
3 u/[deleted] Jan 08 '20 [removed] — view removed comment 2 u/[deleted] Jan 08 '20 Yeah technically it could be done in O(n) if the list is already in order but that defeats the purpose of this exercise 1 u/Cruuncher Jan 09 '20 Technically it can be done in O(n) from any order of you get really lucky.Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
3
2 u/[deleted] Jan 08 '20 Yeah technically it could be done in O(n) if the list is already in order but that defeats the purpose of this exercise 1 u/Cruuncher Jan 09 '20 Technically it can be done in O(n) from any order of you get really lucky.Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
2
Yeah technically it could be done in O(n) if the list is already in order but that defeats the purpose of this exercise
1 u/Cruuncher Jan 09 '20 Technically it can be done in O(n) from any order of you get really lucky.Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
1
Technically it can be done in O(n) from any order of you get really lucky.
Which means that the size of the graph can range from 2 columns to a file size bigger than all of the internet that's ever existed
11
u/[deleted] Jan 08 '20
[removed] — view removed comment