Over 100 JavaScript Algorithms and Data Structures

Learn over 100 JavaScript algorithms and data structures, from basic to advanced. Master the fundamentals of data structures and algorithms and apply them to real-world problems. This repository contains JavaScript based examples of many popular algorithms and data structures.

📘 15+ Best JavaScript Books for Beginners and Experienced Coders

Data Structures

A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.

B - Beginner, A - Advanced

📕 Top 15 Data Structures and Algorithms Books for Every Developer

Algorithms

An algorithm is an unambiguous specification of how to solve a class of problems. It is a set of rules that precisely define a sequence of operations.

B - Beginner, A - Advanced

Algorithms by Topic

Algorithms by Paradigm

An algorithmic paradigm is a generic method or approach which underlies the design of a class of algorithms. It is an abstraction higher than the notion of an algorithm, just as an algorithm is an abstraction higher than a computer program.

How to use this repository

Install all dependencies

npm install

Run ESLint

You may want to run it to check code quality.

npm run lint

Run all tests

npm test

Run tests by name

npm test -- 'LinkedList'

Playground

You may play with data-structures and algorithms in ./src/playground/playground.js file and write tests for it in ./src/playground/__test__/playground.test.js.

Then just simply run the following command to test if your playground code works as expected:

npm test -- 'playground'

Useful Information

Big O Notation

Big O notation is used to classify algorithms according to how their running time or space requirements grow as the input size grows. On the chart below you may find most common orders of growth of algorithms specified in Big O notation.

[Big O graphs

Source: Big O Cheat Sheet.

Below is the list of some of the most used Big O notations and their performance comparisons against different sizes of the input data.
JavaScript Algorithms and Data Structures

Data Structure Operations Complexity

JavaScript Algorithms and Data Structures

Array Sorting Algorithms Complexity

JavaScript Algorithms and Data Structures

#datastructures #algorithms #javascript 

Over 100 JavaScript Algorithms and Data Structures
1 Likes91.10 GEEK