Computer Science, asked by pardeep2025, 5 months ago

QI Perform Selection sort algorithm on the following data and obtain the final sorted array:
74 54 23 5 27 43 22 45
Write the full working step by step showing all the passes and the status of the array at every
step. Also write itâ€TMs time complexity.

Answers

Answered by keyboardavro
3

Answer:

Explanation:

arr[] = 64 25 12 22 11

// Find the minimum element in arr[0...4]

// and place it at beginning

11 25 12 22 64

// Find the minimum element in arr[1...4]

// and place it at beginning of arr[1...4]

11 12 25 22 64

// Find the minimum element in arr[2...4]

// and place it at beginning of arr[2...4]

11 12 22 25 64

// Find the minimum element in arr[3...4]

// and place it at beginning of arr[3...4]

11 12 22 25 64

Answered by kashisharora870
0

Explanation:

last result is

5 22 23 27 43 45 54 74

Similar questions