Question: algoritma complexitiy Q2 Algorithmic Complexity 18 Points (a) (6 pts) Suppose that for an input of size n, the worst-case time complexity of an algorithm
algoritma complexitiy

Q2 Algorithmic Complexity 18 Points (a) (6 pts) Suppose that for an input of size n, the worst-case time complexity of an algorithm is Odlog n). How much does its running time increase if we double the input size? Enter your answer here (b) (6 pts) Suppose that for an input of size n, the time complexity of an algorithm is O(sqrt(n)). Assuming that it takes 50 seconds to get an answer with this algorithm for an input of size 400, how long does executing the algorithm take for an input size of 100? Enter your answer here (c) (6 pts) Assume that you can use two different algorithms (Alg X and Alg Y) to solve a problem. While the running time of Alg X is linear (O(n)), the running time of Alg Y is quadratic (O(n^2)). Argue whether or not using Alg X is always the better choice for solving the problem. Enter your answer here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
