SE Sem IV AoA Lab Experiment 1 202425
SE Sem IV AoA Lab Experiment 1 202425
1
To implement Selection Sort
Date of Performance: 20/01/2025
Date of Submission:
Experiment No. 1
The algorithm divides the input list into two parts: the sub list of items already sorted,
which is built up from left to right at the front (left) of the list, and the sub list of items
remaining to be sorted that occupy the rest of the list. Initially, the sorted sub list is empty
and the unsorted sub list is the entire input list. The algorithm proceeds by finding the
smallest (or largest, depending on sorting order) element in the unsorted sub list,
exchanging it with the leftmost unsorted element (putting it in sorted order), and moving
the sub-list boundaries one element to the right.
Example:
Sort the given array using selection sort. arr[] = 64 25 12 22 11
Output: