Sparse Array

What Does Sparse Array Mean?

A sparse array is an array of data in which many elements have a value of zero. This is in contrast to a dense array, where most of the elements have non-zero values or are “full” of numbers. A sparse array may be treated differently than a dense array in digital data handling.


Techopedia Explains Sparse Array

As with other types of sparse information resources, such as, for example, a sparse matrix, a sparse array may be compressed or truncated to fit a particular storage space. Rather than holding all of the actual zero values in variables, the array could simply point to the number of zero values in a sequence or otherwise compress the array’s data storage.

In computer science, a sparse array is, in some ways, handled operationally just like any other array – an array is a set of variables each holding a specific value. Arrays are labeled in ways that show their sequence – for example, in common computer language notation, an array of six variables named A(6) can hold values for A1, A2, A3, A4, A5 and A6. If more than three or four of these values are zero, the array is said to be “sparse.”


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…