↧
Answer by Peter Cordes for Why bubble sort is not efficient?
Bubble Sort has O(N^2) time complexity so it's garbage for large arrays compared to O(N log N) sorts.In JS, if possible use built-in sort functions that the JS runtime might be able to handle with...
View ArticleAnswer by ghost for Why bubble sort is not efficient?
Bubble sort runs in O(n^2) time complexity. Merge sort takes O(n*log(n)) time, while quick sort takes O(n*log(n)) time on average, thus performing better than bubble sort. Refer to this: complexity of...
View ArticleWhy bubble sort is not efficient?
I am developing backend project using node.js and going to implement sorting products functionality.I researched some articles and there were several articles saying bubble sort is not efficient....
View Article