Lab 8: Selection and Insertion sort using Python
Problem statement
Write a Python program to perform selection and insertion sort
Solution Key
CloudCoder Exercise
To be updated.
Pre Lab Questions
What is the output of selection sort after the 1st iteration given the following sequence of numbers: 14 9 4 18 45 2 37 6
What is the worst case complexity for selection sort algorithm?
What is the average case complexity for selection sort algorithm?
What is the output of selection sort after the 2nd iteration given the following sequence of numbers: 16 3 46 9 28 14?
What is the best case complexity for selection sort algorithm?
In a selectionsort of n elements, how many times is the swap function called in the complete execution of the algorithm?
A sorting technique in which successive elements are selected in order and placed into their proper sorted positions is called?
In which cases are the time complexities same in selection sort?
Post Lab Questions
How to remove the duplicates from the resultant array?
Bonus 1
Rewrite the selection sort code above to sort in ascending order
CD Material:
http://10.100.8.8/kata/edit/169305975E?avatar=eagle
http://10.100.8.8/kata/edit/B62817AC60?avatar=hippo
Last updated