2076 10

Design and Analysis of Algorithms20765 marksSorting Algorithms

Write the algorithm for selection sort and explain its time and space complexity.

Write the algorithm for selection sort and explain its time and space complexity. [5]

Selection Sort is a simple comparison-based sorting algorithm that works by repeatedly selecting the minimum element from the unsorted portion of the array and placing it at the correct position. --- 1. Start. 2. Let array A have n elements (index 0 to n-1). 3. For each position i from 0 to n-2: ...

Up nextTrace heap sort algorithm for the following data: (2, 9, 3, 12, 15, 8, 11)