What is bubble sort and insertion sort in Python ?
Answers
Answered by
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
1
- The basic idea of bubble sort is to compare two adjoining values and exchange them if they are not in proper order.
- 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