Advertisements
Advertisements
प्रश्न
Consider the following unsorted list.
Neena Meeta Geeta Reeta Seeta
Sort the list using selection sort algorithm. Show the status of the list after every iteration.
लघु उत्तर
Advertisements
उत्तर
Selection sort repeatedly places the alphabetically smallest name from the unsorted part in its correct position.
Initial list: [Neena, Meeta, Geeta, Reeta, Seeta]
| Iteration | Status of list |
|---|---|
| 1 | [Geeta, Meeta, Neena, Reeta, Seeta] |
| 2 | [Geeta, Meeta, Neena, Reeta, Seeta] |
| 3 | [Geeta, Meeta, Neena, Reeta, Seeta] |
| 4 | [Geeta, Meeta, Neena, Reeta, Seeta] |
Sorted list: [Geeta, Meeta, Neena, Reeta, Seeta]
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
