CSC2302_Lecture11
CSC2302_Lecture11
Data Structures
Spring 2024
Why Sorting?
• Selection Sort
• Bubble Sort
• Insertion Sort
𝑛−1 𝑛−1
𝑛 𝑛−1 𝑛(𝑛 + 3)
𝑛−𝑖+1=𝑛 𝑛+1 − 𝑖 =𝑛 𝑛+1 − =
2 2
𝑖=0 𝑖=0