I'm studying for an Algorithms and Data Structure test. There is a type of question that is usually always asked by my professor but I don't know how to answer/solve it.
Question 1: An Algorithm with an worst-case execution time of 3n*(log n), being n the number of elements in the input, is:
- a) An algorithm with an execution time of type Θ(n log n).
- b) An algorithm with an execution time of type O(n log n).
- c) An algorithm with an execution time of type O(n^2).
- d) None of the above.
Question 2: An Algorithm with an execution time of 2^100 + (1/3)*n^2 + 100n, being n the number of elements in the input, is:
- a) An algorithm with an execution time of type Θ(n^2).
- b) An algorithm with an execution time of type O(2^n).
- c) An algorithm with an execution time of type Θ(2^n).
- d) None of the above.
I want to know how I can think about these problems in order to solve them. Any help is welcome (even by just giving the solution to these two questions). Thanks.