One of the first data structures we learn about in computer science is an array. Simply put, an array is a collection of elements stored next to each other.

In general, the elements in an array are of the same data type. An array is both a primitive data type and a data structure commonly used to implement other data structures such as stacks and queues. To understand the time complexity of array operations, we need to remember that an array requires contiguous space in memory.

Let’s picture this.

Image by Pixabay

Think of a movie theater as your computer’s memory; the seats…


Computer science was developed as a way of leveraging computers to solve mathematical problems quickly. In a general computer science problem, you take some data as an input and return some data as an output.

The series of computational steps you need to take to turn that input data into an output data is called an algorithm, and the way the data is organized has a direct impact on the efficiency of the algorithm. A data structure is a way to store and organize data so that it can be used efficiently. Using algorithms, we can perform operations to modify…

Fullstack Moon

all things full stack development.

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