JavaScript Data Structures: Recap: Lists, Stack, Queue
Tags: beginners, tutorial, javascript, webdev
Published: 2020-01-09 09:59:01

---
title: "JavaScript Data Structures: Recap: Lists, Stack, Queue"
description: "JavaScript Data Structures: Recap: Lists, Stack, Queue"
published: true
tags: ["Beginners", "Tutorial", "JavaScript", "Webdev"]
series: JavaScript Data Structures
---

## Intro

[Last time](https://dev.to/miku86/javascript-data-structures-queue-recap-2fbc), we made a recap of the Queue data structure.

Today, we want to make a recap about all our learned data structure so far.

---

## Our Data Structures

- [Singly Linked List](https://dev.to/miku86/javascript-data-structures-singly-linked-list-2og)
- [Doubly Linked List](https://dev.to/miku86/javascript-data-structures-doubly-linked-list-intro-and-setup-275b)
- [Stack](https://dev.to/miku86/javascript-data-structures-stack-intro-51la)
- [Queue](https://dev.to/miku86/javascript-data-structures-queue-intro-2n49)

All of these data structures are linear, meaning its elements are connected in a sequence and we can traverse the whole data structure in a single run.

### Singly Linked List

We started with the [Singly Linked List](https://dev.to/miku86/javascript-data-structures-singly-linked-list-2og). This was our longest series of 11 lessons, because usually it takes most of the time to understand some basic concepts, e.g. what "linked" means, how a node works and which methods our data structure needs. Every element in a Singly Linked List has a pointer to its next node.

### Doubly Linked List

After we've [finished the Singly Linked List](https://dev.to/miku86/javascript-data-structures-singly-linked-list-reca-210b), we learned about the [Doubly Linked List](https://dev.to/miku86/javascript-data-structures-doubly-linked-list-intro-and-setup-275b) in a series of 10 lessons. Because we already had some insights about the concepts of a Singly Linked List, it became easier to understand the concepts, to learn about the [Pros and Cons of a Doubly Linked List](https://dev.to/miku86/javascript-data-structures-doubly-linked-list-recap-5741#thoughts-about-the-doubly-linked-list) and to implement it. Every element in a Doubly Linked List has a pointer to its next node _and_ to its previous node.

### Stack

After we've [finished the Doubly Linked List](https://dev.to/miku86/javascript-data-structures-doubly-linked-list-recap-5741), we had some solid fundamentals to [start with the Stack](https://dev.to/miku86/javascript-data-structures-stack-intro-51la) and to learn about its ["Last In, First Out"-Principle](https://dev.to/miku86/javascript-data-structures-stack-recap-43ec#thoughts-about-the-stack), e.g. when we have a deck of cards.

### Queue

After we've [finished the Stack](https://dev.to/miku86/javascript-data-structures-stack-recap-43ec), we [started with the Queue](https://dev.to/miku86/javascript-data-structures-queue-intro-2n49) and learned about its ["First In, First Out"-Principle](https://dev.to/miku86/javascript-data-structures-queue-recap-2fbc#thoughts-about-the-queue-), e.g. when we stand in line in a store.

---

## Big O

All of our 4 data structures have the same Big O values.

![linear data structures bigo](https://dev-to-uploads.s3.amazonaws.com/i/w02e7u2gcrmxxu0nrrod.png)
[Source](https://www.bigocheatsheet.com/)

---

## Further Reading 📖

- [Wikipedia: Singly Linked List](https://en.wikipedia.org/wiki/Linked_list#Singly_linked_list)
- [Wikipedia: Doubly Linked List](https://en.wikipedia.org/wiki/Doubly_linked_list)
- [Wikipedia: Stack](https://en.wikipedia.org/wiki/Stack_(abstract_data_type))
- [Wikipedia: Queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type))
- [Wikipedia: Other Linear Data Structures](https://en.wikipedia.org/wiki/List_of_data_structures#Linear_data_structures)

---

## Questions ❔

- What additional data structure are you interested in?
- Can you think about additional methods for our data structures?

---

## Next Part ➡️

We will start with a new data structure!

Don't miss interesting stuff, [subscribe](https://miku86.com/newsletter)!