1.

What is the running time of naïve matrix multiplication algorithm?(a) O(n^2.81)(b) O(n^4)(c) O(n)(d) O(n^3)I had been asked this question during an interview.I'd like to ask this question from Number Theory topic in portion Number Theory of Data Structures & Algorithms II

Answer»

Correct answer is (d) O(n^3)

The best explanation: The traditional matrix MULTIPLICATION algorithm takes O(n^3) TIME. The number of recursive MULTIPLICATIONS involved in this algorithm is 8.



Discussion

No Comment Found

Related InterviewSolutions