1.

Is O(n) the Worst case Time Complexity for addition of two Sparse Matrix?(a) True(b) FalseMy enquiry is from Arrays Types in division Arrays Types of Data Structures & Algorithms II got this question in homework.

Answer»

The correct choice is (a) True

To EXPLAIN: In ADDITION, the matrix is traversed linearly, hence it has the time COMPLEXITY of O(n) where n is the NUMBER of non-zero elements in the largest matrix amongst two.



Discussion

No Comment Found

Related InterviewSolutions