[Solved] When do you use a sparse array? (MCQ)

When do you use a sparse array?

a) When there are unique elements in the array
b) When the array has more occurrence of zero elements
c) When the data type of elements differ
d) When elements are sorted

Answer: b
Explanation: It need not necessarily be zero, it could be any default value, usually zero or null.

Comments