Why 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. Bubble sort was used in my previous projects and I was surprised why it is bad. Could anyone explain about why it is inefficient? If you can explain by c programming or assembler commands it would be much appreciated. 回答1: Bubble Sort has O(N^2) time complexity so it's garbage for large arrays