Question: Question A) [2 points] Using reasoning similar to what we used for insertion sort in class, analyce the rusning time of the selection sort algorithm
Question A) [2 points] Using reasoning similar to what we used for insertion sort in class, analyce the rusning time of the selection sort algorithm from the first homework assignment. Queation 5) [2 points] Why do all cases have the same runtime in selection sort? The runtime is same throughout the selection sort algorithm because, it performs the same number of operations with every input it gets it continues it regardless of the input provided. The algorithm selects minimum element from the unsorted part using two loops. Also the number of iterabions of. inner and outer loops are the resultant of the size of the given array and it does not depend on the actual chaments in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
