Computer Science, asked by aryanlohia27, 9 months ago

why is insertion sort considered as better algorithm than bubble sort?

Answers

Answered by ArchitPathak
0

Answer:

Specifically, Insertion is faster than Bubble because of what occurs in each pass: Bubble Sort swaps through all remaining unsorted values, moving one to the bottom. Insertion Sort swaps a value up into already-sorted values, stopping at the right place. Once a pass starts, Bubble Sort must see it through to the end.

Similar questions