Computer Science, asked by satkarshsharma1992, 8 months ago

What is bubble sort and insertion sort in Python ?​

Answers

Answered by abhirock51
0

Answer:

Python Search and Sorting : Exercise-4 with Solution

Note : According to Wikipedia "Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.

Answered by TeraBhaii
1

\large{\bullet{\underline{\tt{Bubble\:sort:-}}}}

  • The basic idea of bubble sort is to compare two adjoining values and exchange them if they are not in proper order.

\large{\bullet{\underline{\tt{Insertion\:sort:-}}}}

  • Insertion sort is a sorting algorithm that builds a sorted list one element at a time from the unsorted list by inserting the element at its correct position in sorted lists.

Similar questions