Question: Consider algorithms with the following time complexities: Algorithm 1: 5nlgn Algorithm 2: n! Algorithm 3: 3n Algorithm 4: 50n Algorithm 5: n2 Algorithm 6: 2n3
Consider algorithms with the following time complexities:
Algorithm 1: 5nlgn
Algorithm 2: n!
Algorithm 3: 3n
Algorithm 4: 50n
Algorithm 5: n2
Algorithm 6: 2n3
Assuming that the above formulas give the running times of these algorithms in microseconds, make a table showing the running time of each algorithm for input sizes of n=10, n=100, and n=1000. If a running time turns out to be more than 1050 seconds, you can simply write ``too large in the table. Write the algorithms in order of slowest to fastest when n=10. Write the algorithms in order of asymptotic running time (slowest to fastest). For what values of n is Algorithm 4 faster than Algorithm 1?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
