Selection Sort
Selection Sort A selection sort is a sorting techniqlue in which successive elements are selected in order and paced into their proper sorted positions. By starting from the first element and using a nest of for loops, a pass through the array is made to locate the minimum value. Once this is found, it 1s placed in the first position of the array (position 0). Then the remaining elements is made to find the next smallest element, which is placed in the second position (position 1), and so on. Once the next to last element is compared with the last element, all the elements have been sorted into ascending order. The algorithm works as follows: Find the minimum value in the list. Swap it with the value in the first position. Repeat the above steps for the remainder of the list (starting at the second position and advancing each time). Algorithm for Selection Sort This algorithm sorts the array list with n elements Initialization, Set loc=o