Data Structures
gitSushi
Posted on October 15, 2020
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.
Queue
We will be using classes to build our queue.
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
Posted on October 15, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
September 6, 2024
September 2, 2024