time complexity of bubble sort in C language
Answers
Answered by
1
Answer:
It is the slowest algorithm and it runs with a time complexity of O(n^2). Bubble sort can be optimized by using a flag variable that exits the loop once swapping is done. The best complexity of a bubble sort can be O(n). O(n) is only possible if the array is sorted.
Answered by
1
Answer:
answer is
Explanation:
It is the slowest algorithm and it runs with a time complexity of O(n^2).Bubble sort can be optimised can using a flag variable that exists the loop once swaping is done .The best complexityof a bubble sort can be O(n).O(n) is only possible if the array is sorted .
HOPE it's helpful to you
PLSS MARK ME AS BRAINLIST AND THANK ME PLSS
Similar questions
English,
4 months ago
Computer Science,
4 months ago
Math,
4 months ago
Computer Science,
8 months ago
Math,
8 months ago
Math,
1 year ago