Non-contiguous data structure
Updated: 04/26/2017 by Computer Hope
A non-contiguous data structure is a method of storing data in sectors of memory that are not adjoining. Essentially, elements or nodes are not stored in adjacent memory locations. Consequently, there may be gaps or unused spaces between the elements. However, with this method, these memory holes are usable so less memory is wasted.
Examples of non-contiguous data structures include linked lists, trees, and graphs. Non-contiguous data structures are used when the size of the data is dynamic and unpredictable or when the data needs to be rearranged frequently. They can also be useful when the data is too large to fit into a contiguous memory block.