Looking at Linked Lists

What are they, and will you ever use them with JavaScript?

Maxwell Harvey Croy
Level Up Coding
Published in
6 min readNov 1, 2020

--

Photo by Markus Spiske on Unsplash

While I was still attending the Flatiron School’s Software Engineering Immersive Program, I tried to connect with at least one engineer per week to gain as much insight as possible into what makes a successful developer.

While the topics covered in those discussions were varied, I was always sure to ask, “What do I need to start learning to get ahead of the pack?”. The answer was always the same: “Start learning about Data Structures and Algorithms.” So, that’s what I did.

While I’ve learned a lot while trying to follow that advice, I’ve noticed that while there are a lot of resources that teach about different data structures and how to build them into your algorithms, not a lot of those resources truly go into depth about what they are how they are implemented in practice.

Today, I’d like to spend some time discussing one of the most referred to data structures out there and how it’s used in a JavaScript developer’s day-to-day: the Linked List.

What is a Linked List, and how is information stored?

In computer science, different data structures are used to store data in ways that allow for certain functions on that data. Each has its own pros and cons in terms of storage, malleability, and accessibility, and for those reasons, one data structure might be preferable to another when solving certain problems.

The Linked List is a data structure that stores data linearly (i.e., with an order) without using memory linearly. Let’s dive into this characteristic a bit further, as all of the other benefits of a Linked List stem from this feature.

When a program is being run on a computer, information that is necessary for the program to function is stored in RAM, or Random Access Memory (I’ll be referring to this as just ‘memory’ for the rest of this article). Memory stores information similarly to an array in that it’s made up of a bunch of indices that can store a certain amount of information, in this case, a byte. Memory has a limit, so as more bytes of memory are being used, the less memory is available for use.

--

--

Music Fanatic, Software Engineer, and Cheeseburger Enthusiast. I enjoy writing about music I like, programming, and other things of interest.