AI engineering glossary · Data structures algorithms
What is array?
Array: A fixed-size block of memory holding items of the same kind one after another, so any item can be reached directly from its position number. Reading or writing by index is very fast, but inserting in the middle requires shifting later items.
Array: an example
In an array of 5 marks [72, 88, 65, 90, 79], marks[3] gives 90 in one step, but inserting a new value at position 1 moves four items.
Related terms
More Data structures algorithms terms
- AVL tree
- B-tree
- Backtracking
- Base case
- Bellman-Ford algorithm
- Big-O notation
- Big-Omega notation
- Big-Theta notation
Where you learn it
Array is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.