Skip to main content

Array Variations

Array-Based Linear Data Structures

TypeDescriptionKey CharacteristicTypical Use CaseAccess PatternMemory BehaviorNotes
ArrayFixed-size indexed collectionContiguous memoryFast lookupIndexedContiguousBasic building block
Associative ArrayKey–value mappingKey-based accessDictionaries, mapsKey-basedDepends on implementationOften hash-backed
Bit ArrayArray of bitsBit-level storageFlags, permissionsIndexed (bit)CompactMemory efficient
Bit FieldGroup of bits in a wordBit maskingLow-level systemsBit-levelVery compactUsed in C/C++
BitboardBit array representing stateEncodes board positionsGame enginesBit-levelCompactChess, Go
BitmapBit-based image representationPixel-level bitsGraphics, fontsIndexedCompactBinary images
Circular BufferArray with wrap-aroundFixed-size queueStreaming dataIndexedContiguousOverwrites old data
Control TableLookup-driven arrayPrecomputed valuesControl systemsIndexedContiguousFast decision making
ImageMulti-dimensional arrayPixel gridImage processingIndexed (2D/3D)ContiguousMatrix-based
Dope VectorDescriptor for arrayStores bounds & stridesCompilersIndexedMetadata-basedUsed internally
Dynamic ArrayResizable arrayAutomatic growthLists, vectorsIndexedContiguousAmortized resizing
Gap BufferArray with a gapFast insert near cursorText editorsIndexedContiguous + gapEditor internals
Hashed Array TreeTree of arraysScalable dynamic sizeLarge collectionsIndexedSemi-contiguousUsed in functional langs
Lookup TablePrecomputed resultsConstant-time accessMath, encodingIndexedContiguousTrades memory for speed
Matrix2D arrayRow–column layoutMath, MLIndexed (2D)ContiguousLinear algebra
Parallel ArrayMultiple arrays in syncColumnar storageData processingIndexedContiguousCache-friendly
Sorted ArrayOrdered arrayBinary search enabledSearch-heavy systemsIndexedContiguousCostly insertions
Sparse MatrixStores non-zero valuesMemory optimizedScientific computingIndexed (indirect)SparseUses mappings
Iliffe VectorArray of pointers to arraysNon-contiguous rowsIrregular matricesIndexedNon-contiguousFlexible rows
Variable-length ArraySize decided at runtimeStack allocationTemporary storageIndexedContiguousLanguage dependent