Array in Data Structures

  1. An array is a container of elements.
  2. Elements have a specific value and data type.
  3. Each element also has its own index, which is used to access the element.
  • Arrays are best for storing multiple values in a single variable.
  • Arrays are better at processing many values easily and quickly.
  • Sorting and searching the values is easier in arrays.
  • Arrays allow random access to elements. This makes accessing elements by position faster.
  • Arrays have better cache locality that can make a pretty big difference in performance.
  • Arrays represent multiple data items of the same type using a single name.

--

--

--

2nd Year CSE UnderGraduate

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

React Components

Deep Comparison Of State Management Solutions in Angular

HTML SEMANTICS & ACCESSIBILITY

Object Oriented Javascript, this, and bind()

Channel Menu setup in Salesforce Experience Site(Community Cloud)

A tiny expression compiler for React Native Animated values

BlogPost_405

RecoilJS How to get values and set values outside of Component (EN)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Megha Agarwal

Megha Agarwal

2nd Year CSE UnderGraduate

More from Medium

Prim’s Algorithm

LeetCode — Linked List Cycle

Is java compiler-based or Interpreter based ?

Prim’s Algorithm