3 ms·
This is a nice write up. One thing though: > Bubble sort is an example of an O(n^2) Algorithm[2], which means that if it takes 1 second to sort a list of siz
by andreschuelein 10y ago
This is a nice write up. One thing though:
> Bubble sort is an example of an O(n^2) Algorithm[2], which means that if it takes 1 second to sort a list of size=10, then it will take roughly 10 seconds to sort a list of size=100.
It would take roughly 100 seconds to sort an array of size 100, if it would take 1 second to sort an array of size 10. (10 times the size ~ 10^2 times the time)
- jzymbaluk 10y agoOh, derp. Thanks for catching that. I'm not able to edit the original comment for some reason though.