Question: I.a) For the following functions, visualize the functions for n {1,2,4,8,16,32,64,128,256,512,1024} 1) lg 2 n 2) 3) n 4) n*lg n 5) n^2 6) n^3
I.a) For the following functions, visualize the functions for n {1,2,4,8,16,32,64,128,256,512,1024}
1) lg2n
2)
3) n
4) n*lg n
5) n^2
6) n^3
7) 2^n
8) n!
I.b) Find the range of n (input) such that merge sort outperforms insertion sort in the worst-case scenario.
I.c) Find the range of n (input) such that insertion sort outperforms merge sort in the average-case scenario.
I.d) Find the range of n (input) such that bubble sort outperforms selection sort in the best-case scenario.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
