440 likes | 637 Views
Selection Sort. 89. 45. 68. 90. 29. 34. 17. 0. 1. 2. 3. 4. 5. 6. Elements to be sorted. Selection Sort. min = 0. i = 0. 89. 45. 68. 90. 29. 34. 17. 0. 1. 2. 3. 4. 5. 6. Remaining elements to be sorted. elements already in their right positions.
E N D
Selection Sort 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Elements to be sorted
Selection Sort min = 0 i = 0 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 0 j = 1 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 0 j = 2 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 0 j = 3 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 0 j = 4 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 0 j = 5 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 6 i = 0 j = 6 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort SWAP min = 6 i = 0 89 45 68 90 29 34 17 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort i = 0 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 1 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 1 j = 2 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 1 i = 1 j = 3 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 1 j = 4 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 1 j = 5 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 1 j = 6 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort SWAP min = 4 i = 1 17 45 68 90 29 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort i = 1 17 29 68 90 45 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 2 i = 2 j = 3 17 29 68 90 45 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 5 i = 2 j = 6 17 29 68 90 45 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort SWAP min = 5 i = 2 17 29 68 90 45 34 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort i = 2 17 29 34 90 45 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 3 i = 3 j = 4 17 29 34 90 45 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 3 j = 6 17 29 34 90 45 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 i = 3 SWAP 17 29 34 90 45 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort i = 3 17 29 34 45 90 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 4 j = 5 i = 4 17 29 34 45 90 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 5 j = 6 i = 4 17 29 34 45 90 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 5 i = 4 SWAP 17 29 34 45 90 68 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort i = 4 17 29 34 45 68 90 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 5 j = 6 i = 5 17 29 34 45 68 90 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 6 j = 6 i = 5 17 29 34 45 68 90 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort min = 6 i = 5 SWAP 17 29 34 45 68 90 89 0 1 2 3 4 5 6 Remaining elements to be sorted elements already in their right positions
Selection Sort 17 29 34 45 68 89 90 0 1 2 3 4 5 6 All elements already in their right positions