Lecture No.43 Data Structures
Lecture No.43 Data Structures
43
Data Structures
20 8 5 10 7
5 7 8 10 20
Elementary Sorting Algorithms
Selection Sort
Insertion Sort
Bubble Sort
Selection Sort
Main idea:
• find the smallest element
• put it in the first position
• find the next smallest element
• put it in the second position
• …
And so on, until you get to the end of the list