B03A-2015D – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Exam Questions-CBSE12D-2015-B03A #PYTHON#6533    siteicon   siteicon  

Problem Statement - B03A-2015D

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 ?
14, 10, -12, 9, 15, 35

Solution

TC++ #6533

Bubble Sort
       14,10,-12,9,15,35 (Original Content)
    i. 14,10,9,15,35,-12
   ii. 14,10,15,35,9,-12
  iii. 14,15,35,10,9,-12
   iv. 15,35,14,10,9,-12 (Unsorted status 
                      after 4th pass)
Selection Sort
       14,10,-12,9,15,35 (Original Content)
    i. 35,10,-12,9,15,14
   ii. 35,15,12,9,10,14
  iii. 35,15,14,9,10,-12
   iv. 35,15,14,10,9,12


Share

CSKC| Created: 14-Jan-2019 | Updated: 14-Jan-2019|CBSE12D-2015









Back