1.

The matrix contains m rows and n columns. The matrix is called Sparse Matrix if ________(a) Total number of Zero elements > (m*n)/2(b) Total number of Zero elements = m + n(c) Total number of Zero elements = m/n(d) Total number of Zero elements = m-nI'm obligated to ask this question of Arrays Types topic in chapter Arrays Types of Data Structures & Algorithms II have been asked this question in an online interview.

Answer»

Correct answer is (a) Total NUMBER of Zero elements > (m*N)/2

For explanation: For MATRIX to be SPARSE Matrix, it should contain Zero elements more than the non-zero elements. Total elements of the given matrix is m*n. So if Total number of Zero elements > (m*n)/2, then the matrix is called Sparse Matrix.



Discussion

No Comment Found

Related InterviewSolutions