Week 3 - Algorithms
Lecture
Sorting Algorithm
Selection sort
Procedure SelectionSort
For i from 0 to n-1
Find the smallest number between numbers[i] and numbers[n-1]
Swap the smallest number with numbers[i]
End For
End ProcedureProcedure SelectionSort
Repeat
Search the unsorted part of the data to find the smallest value
Swap the smallest found value with the first element of the unsorted part
Until no unsorted elements remain
End ProcedureBubble sort
Merge sort
Section

Problem Set 3
Things to notice in the problem statement
Divide and Conquer
Take-aways
Before the problem
Things to notice in the problem statement
Divide and Conquer
Take-aways
Things to notice in the problem statement
Divide and Conquer
Useful Snippets
Take-aways
Last updated