LinearSearch algorithm for Searching Input is a list of n nu
Linear-Search algorithm for Searching. Input is a list of n numbers. Strassen\'s algorithm for Matrix Multiplication Problem (as in project 1 of your programming assignment). Input matrices are of size n times n. f(n) = O(g(n)) if and only if g(n) = (f(n)). f(n) = O(g(n)) and g(n) = theta (h(n)), then f(n) = (h(n)). If f(n) = O(g(n)) an g(n) = O (h(n)), then f(n) = (h(n)). Algorithm#1\'s complexity is theta (n^3). If Algorithm#1 takes 27 time units for an length 3, how long would we expect it to take for a list of length 10?
Solution
1. a. QuickSort: Best-case complexity: O(n log n), Worst-case complexity: O(n2)
b. Linear Search: Best-case complexity: O(1), Worst-case complexity: O(n)
c. Strassen Matrix Multiplication: Best-case complexity: O(1), Worst-case complexity: O(n2.807).
