Array
An array is a data structure that stores data/ elements directly next to each other.
Every single Date/ element that is stored in the array have an index.
Indices start from 0 till the length of array-1. Index ∈ [0, length of array-1].
Arrays have fixed size/ length and they are mutable.
Types of Arrays :
- Linear array/ one-dimensional array.
- Two-dimensional array.
- Multi-dimensional array.
The simplest type of data structure is a linear/ one-dimensional array.
Linear array consists of elements that are stored next to each other in a linear way.
Two dimensional array consists of elements that are stored in many linear arrays under each other.
More precisely, there are rows and columns.
Comments
Post a Comment