Arrays…..

Shayla White
1 min readApr 27, 2021

An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (generally denoted by the name of the array).

Following are the important terms to understand the concept of Array.

  • Element − Each item stored in an array is called an element.
  • Index − Each location of an element in an array has a numerical index, which is used to identify the element.

You use what it’s called an “index” (“indices” in plural) to access a value in an array.

Often times a problem will refer to indices when solving Data Structure and Algorithms problems, which can be used as a great indicator to implement Arrays to solve a problem. Next week we will discuss how to implement Arrays and go over problem solving with arrays.

--

--