Member-only story

Arrays 101: A Beginner’s Guide to Data Structures

Understanding array and its type (Part-I)

Sushmita Singh
Code  Writers
10 min readMar 20, 2023

--

Photo by Claudio Schwarz on Unsplash

An array is a linear data structure and is used to store multiple data elements of the same type together at contiguous memory locations. It is one of the most simple and really, most popular data structures.

Arrays are also used to implement other data structures like stacks and queues.

Therefore, arrays are an important part of your programming journey and if you get the basics right, it will help you in your interview questions.

Table of Content

· Introduction to Arrays
What is an array?
· Why Do We Need an Array
· Basic Terminologies
· Size of An Array
· Initializing an Array
· How to Access Elements of Arrays
· Types of Arrays
One-dimensional arrays
Multi-dimensional arrays
· Calculating the Address of Elements in 1-D and 2-D arrays
#1. 1-D Array
#2. 2-D Array: Row Major
#2. 2-D Array: Column Major
· Takeaway
· Stay In Touch
· References

--

--

Code  Writers
Code  Writers

Published in Code Writers

For those who dare to dream in binary. A publication by coders, for coders.

Sushmita Singh
Sushmita Singh

Written by Sushmita Singh

Writer || Coder || Book Lover. Helping you evolve into the ultimate version of yourself. https://sushmitasingh.carrd.co/

Responses (1)