Sign in

Before Semicolon
Blog & YouTube Channel for Web, UI & Software Development - beforesemicolon.comyoutube.com/c/BeforeSemicolon

Everything about Set Data Structure in Javascript

There are many situations where you need to compare multiple lists and extract items they have or not in common, available in one only, etc. Sets allow you to do just that and more. In particular, the Javascript Set is a very special and powerful one but still lacks important things that other languages offer.

What is a Set?

Set is a keyed collection of unique items stored in no particular…


Everything about Map Data Structure in Javascript

A Dictionary data structure is known by many names. It is often called Map, Associative Array, Symbol, or Lookup table. In Javascript, we have Objects, Map, and WeakMap which can all fall into this category but, do you know their difference and when to use which?

What is a Dictionary?

A Dictionary is a data structure that stores key-value pairs. In a sense, if you know a key for the item…


Everything about Queue Data Structure in Javascript

Javascript uses a queue to track the code to execute. Your printer also follows a queue to track which document to print next. Hospitals use a system based on a priority queue to decide which patient to go in first. Point is, Queues are everywhere. From your favorite Coffee shop to computer CPU and your server or network, the queue is an important data structure to learn about.


As you may have seen in the previous article, there are some limitations and things that can be improved about Queue. Sometimes you also need different constraints or rules around the “enqueuing” and “dequeuing”. For those reasons, the Priority and Circular version of the Queue is available to address very specific situations.

Priority Queue

A priority queue is simply a queue that cares about the priority level of the…


Everything about the stack data structure in JavaScript.

The stack data structure is great in tracking things in an order that allows you to trace back to the origin. When you control-z or undo something, click the back or forward browser button — when your code editor tells you are missing a closing parenthesis on line 13 — you may be dealing with some sort of stack data structure.

What is a Stack?

The stack data structure is a collection of…


Everything about the linked list data structure in JavaScript.

r

Linked lists are probably the simplest and most common lists out there. It is so powerful that it can be used to implement other lists like queue, stack, associative arrays, etc. It allows for easy insertion and removal of items and it is for sure one of the data structures worth studying before diving into tree or graph data structures.

What is a Linked List?

A linked list is a linear…


Let’s continue our adventure through the linked list world by learning how to create double and sorted linked lists.

Read Part 1 of this article

This article already assumes you read or is familiar with the intro to linked list article implementation code as it’s based on it.

Part 1 — Intro to Linked List Data Structure

Double Linked List

To put it simply, in a double-linked list, the elements of the list have 2…


Let’s continue our adventure through the linked list world by learning how to create a circular linked list along with how to reverse a linked list which is a must-know linked list algorithm.

Read previous parts of this article

This article already assumes you read or is familiar with the previously linked list articles covering what it is and its single and double implementations.

Part 1 — Intro to Linked List Data…


The array is a powerful data structure and has a large variety of applications. Let’s continue our exploration by diving into more array methods and possible algorithm to further enrich your knowledge.

Check the Previous Array article

This article is Part II of the initial array data structure introductory article you must check to understand how it works and much more.

Part 1 — Intro to Array Data Structure

Searching and Finding Array Items

You can access any item…


Everything about the array data structure in JavaScript.

JavaScript provides you with 2 ways to work with indexed list data. Both are powerful and address a very specific usage case. Understanding the difference and how arrays work may help you in the decision of whether to use an array or not for your program data manipulation.

JavaScript Array vs Typed Array

JavaScript array is a list-like object which means that it does not follow the traditional array definition or implementation. It is…

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