Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.
Sorting algorithms are crucial for efficient searching, particularly when using a binary search on sorted data. This chapter presents selection sort, demonstrating its step-by-step mechanism of repeatedly selecting the minimal element and placing it at the beginning of the unsorted portion. The selection sort algorithm is intuitive, although it can be inefficient for large datasets due to its O(n^2) time complexity.
References
chapter 16.pdfClass Notes
Memorization
What we have learnt
Final Test
Revision Tests
Term: Selection Sort
Definition: An algorithm that sorts an array by repeatedly selecting the smallest element from the unsorted portion and moving it to the beginning.
Term: Time Complexity
Definition: A computational complexity that describes the amount of time it takes to run an algorithm as a function of the length of the input.
Term: Binary Search
Definition: A search algorithm that finds the position of a target value within a sorted array, halving the search interval with each step.
Term: Median
Definition: The middle value in a sorted list of numbers, with half the values larger and half smaller.
Term: Big O Notation
Definition: A mathematical notation used to describe the upper bound of the time complexity of an algorithm in terms of input size.