Skip to content
Vaidhyanathan S M edited this page Apr 11, 2021 · 1 revision

Arrays

An array is a collection of items stored at contiguous memory locations. The elements of an array are of same data type. Each element of an array is identified by using index (or position) in that array.

For example:

Consider the array given below:

[1,2,3,4,5]

The element '1' is at position 0 while the element '4' is at position 3.

Advantages of using arrays:

  • Arrays allow random access of elements. So it makes accessing elements by position faster.
  • Arrays have better cache locality which forms a significant factor in improving performance.

Useful Links in this repository:

Problems based on Arrays.

Problems based on 2D-Arrays.

Problems based on Sorting Algorithms

Problems based on Searching Algorithms

Clone this wiki locally