Arrays 101: A Beginner’s Guide to Data Structures
Understanding array and its type (Part-I)
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