हिंदी

Consider the following unsorted list 90 78 20 46 54 1 Write the list after: a. 3rd iteration of selection sort b. 4th iteration of bubble sort c. 5th iteration of insertion sort

Advertisements
Advertisements

प्रश्न

Consider the following unsorted list

90     78      20      46      54      1

Write the list after:

  1. 3rd iteration of selection sort 
  2. 4th iteration of bubble sort 
  3. 5th iteration of insertion sort
लघु उत्तरीय
Advertisements

उत्तर

Initial list: [90, 78, 20, 46, 54, 1]

Sorting method and iteration List status
(a) Selection sort — 3rd iteration [1, 20, 46, 78, 54, 90]
(b) Bubble sort — 4th iteration [20, 1, 46, 54, 78, 90]
(c) Insertion sort — 5th iteration [1, 20, 46, 54, 78, 90]
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: Liner List Manipulation - EXERCISE [पृष्ठ १०४]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×