Selection Sort Vs Insertion Sort - Computer Science

5 months ago
67

This computer science video covers a tutorial on how to analyse the selection sort and insertion sort algorithms. The time complexity of both sorting algorithms is compared using the number of comparisons made during each iteration. The arithmetic series is used to come up with an equation that compares the size of the sorted arraylist with the total number of comparisons made by both sorting algorithms. An introduction to Big O notation is provided to explain why the selection and insertion sort algorithms are both O(n^2).

Loading comments...