Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
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
Answer:
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
C. Sir| Created: 14-Jan-2019 | Updated: 14-Jan-2019|CBSE12D-2015