मराठी

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
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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: Liner List Manipulation - EXERCISE [पृष्ठ १०४]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 5 Liner List Manipulation
EXERCISE | Q 12. | पृष्ठ १०४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×