DEV Community

Cover image for Data Structures
gitSushi
gitSushi

Posted on

Data Structures

Data structures in Javascript for beginners

Javascript has the convenient built-in data structure : the array. This article looks into other data structures and how to code that structure, most starting with a node.

Content

The Node

Stack and Queue

Stack and queue could very well be using arrays, it would in fact be easier. However as said earlier, this article's standpoint is to write the structure ourselves.

Stack

We will be using functions and closures to build our stack.

Edit the Stack on Codepen

Queue

We will be using classes to build our queue.

Edit the Queue on Codepen

Linked List

There are different types of linked list. Let's review in details some of them.

Singly Linked List

Edit the Singly Linked List on Codepen

Doubly Linked List

Edit the Doubly Linked List on Codepen

Hash Table

Edit the Hash Table on Codepen

Tree

Binary Tree

Edit the Binary Tree on Codepen

Footnotes

  1. Wikipedia : Node
  2. Wikipedia : Linked List
  3. Wikipedia : Binary Search

Top comments (0)