What's the name of this array data structure?
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
Introduction
There is no single answer to "what is this array data structure called?" until you describe the behavior. In practice, developers usually mean one of a small group of related structures: a fixed array, a dynamic array, a circular buffer, a jagged array, a sparse array, or a deque-like segmented structure.
Start with the most common name: dynamic array
If the structure behaves like an array but can grow as elements are appended, the usual name is dynamic array. In different languages it may also be called:
- vector
- ArrayList
- resizable array
Python's built-in list is the classic example of a dynamic array:
It gives fast index access like an array, but it can expand when needed. If your mystery structure has contiguous indexed access and occasional resizing, "dynamic array" is probably the right name.
If the ends wrap around, it is probably a circular buffer
If the structure uses a fixed array internally but treats the end as connected back to the beginning, the usual name is circular buffer or ring buffer.
A simple example:
If the defining property is wraparound indexing with fixed capacity, it is not just "an array." It is specifically a circular buffer.
If inner rows have different lengths, it is a jagged array
If you have an array of arrays where each inner array can have a different length, the standard name is jagged array:
This differs from a rectangular 2D array because the row sizes are not uniform.
If most positions are empty, it may be a sparse array
If the structure conceptually has many indexes but only a few populated values, the right name may be sparse array or, more broadly, a sparse representation.
A Python dictionary often acts as a sparse array:
This is useful when storing a huge mostly-empty index space as a dense array would waste memory.
Some structures are really deques or segmented arrays
If the structure supports efficient insertion or removal at both ends and may be internally chunked rather than fully contiguous, it may be closer to a deque than a plain array.
For example, Python's collections.deque is not just a resizable array:
If the behavior is "array-like" but optimized for both ends rather than random insertion in the middle, "deque" is often the better name.
The right name comes from the guarantees
To identify the structure, ask these questions:
- Is the size fixed or resizable?
- Is memory logically contiguous or segmented?
- Are insertions optimized only at the end, or at both ends?
- Does indexing wrap around?
- Are most positions empty?
- Do nested rows have different lengths?
Those properties matter more than how the structure looks at first glance.
Common Pitfalls
The biggest mistake is calling every indexed collection an array. Many array-like structures have different performance guarantees and more specific names.
Another common issue is focusing on syntax instead of behavior. Two languages may use bracket syntax for structures with very different internals.
People also confuse dynamic arrays and linked lists because both can "grow." Growth alone does not tell you the structure type.
Finally, if the structure is optimized for both front and back operations, "deque" is often a better answer than "array."
Summary
- A resizable array-like structure is usually called a dynamic array.
- A fixed-capacity wraparound structure is usually a circular buffer or ring buffer.
- An array of unequal-length rows is a jagged array.
- A mostly-empty indexed structure is often a sparse array representation.
- The correct name depends on the structure's behavioral guarantees, not just its syntax.
Related reading
- What's the purpose of BFS and DFS?
- What's the reason I can't create generic array types in Java?
- What's the simplest algorithm/solution for a single pair shortest path through a real-weighted undirected graph?
- What's the standard algorithm for syncing two lists of related objects?
- When and why should I use a namedtuple instead of a dictionary?
- When doing a ''git push'', what does ''--set-upstream'' do?
- When is doubly linked list more efficient than singly linked list?
- When is each sorting algorithm used?

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.