B03A-2015 – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12A-2015-B03A #PYTHON#6362    siteicon   siteicon  

Problem Statement - B03A-2015

What will be the status of the following list after fourth pass of bubble sort and fourth pass of selection sort used for arranging the following elements in descending order ?
34,6,12,3,45,25

Solution

TC++ #6362

 

Bubble Sort 34,6,12,3,45,25 (Original Content)
    i. 34,12,-3,45,25,-6
   ii. 34,12,45,25,-3,-6
  iii. 34,45,25,12,-3,-6
   iv. 45,34,25,12,-3,-6

Selection Sort 34,6,12,3,45,25 (Original Content)
    
    i. 45,-6,12,-3,34,25
   ii. 45,34,12,-3,-6,25
  iii. 45,34,25,-3,-6,12
   iv. 45,34,25,12,-6,-3
(Unsorted status after 4th pass)


Share

CSKC| Created: 11-Jan-2019 | Updated: 11-Jan-2019|CBSE12A-2015









Back