Developer Dictionary
Array
Definition
A data structure consisting of a collection of elements identified by index or key.
Deep Dive
An array is a fundamental data structure in computer science that stores a fixed-size, sequential collection of elements, typically of the same data type. Each element in an array is identified by an index or key, which represents its position within the array, allowing for direct and efficient access to any element. Arrays are often stored in contiguous memory locations, making them highly optimized for operations that require traversing elements or accessing them by their position.
Examples & Use Cases
- 1A list of product prices in an e-commerce catalog
- 2A collection of student names in a class roster, accessed by their roll number
- 3The pixels that make up an image on a screen, arranged in rows and columns
Related Terms
ListData StructureIndex