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


JS411 Week2

Developer Story: Designing a Proper RESTful Server Module Structure

Knowing These 10 React Libraries Distinguishes the Best Developers

Browser Object Model (BOM)— Javascript Revision

Making CSS Vars work with Lit Element on legacy browsers like IE-11

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

Routing: how to map multiple path names to a single component

JS —Clone and Deep clone with Reference vs Primitive Values!!

File Handling and Exception Handling in Java

Design Pattern- Builder Pattern