What is Selection Sort? And how it works?
Click here for more contents Selection Sort Selection Sort algorithm is used to arrange a list of elements in a particular order (Ascending or Descending). In selection sort, the first element in the list is selected and it is compared repeatedly with remaining all the elements in the list. If any element is smaller than the selected element (for Ascending order), then both are swapped. Then we select the element at second position in the list and it is compared with remaining all elements in the list. If any element is smaller than the selected element, then both are swapped. This procedure is repeated till the entire list is sorted. The selection sort algorithm is performed using following steps... Step 1: Select the first element of the list (i.e., Element at first position in the list). Step 2: Compare the selected element with all other elements in the list. Step 3: For every comparision, if any element is smaller than selected element (for Ascending order), then