Table of Contents
This repository contains implementations of various data structures and algorithms in JavaScript. It aims to provide a comprehensive collection of commonly used data structures and algorithms.
Note: These implementations are primarily for demonstrative purposes and may not be optimized for performance and security. For production use, dedicated and thoroughly tested implementations are recommended.
Cache
- LRU (Least Recently Used)
- MRU (Most Recently Used)
Heap
- MaxHeap
- MinHeap
Linked Lists
- Doubly Linked List
- Singly Linked List
Queue
- Queue
Search
- Binary Search
- Jump Search
- Linear Search
Sorts
- Bogo Sort
- Bubble Sort
- Insertion Sort
- Merge Sort
- QuickSort
- Selection Sort
Stack
- Stack
Trees
- Trie
- BFS (Breadth-First Search) on a Binary Tree
- DFS (Depth-First Search) on a Binary Tree
- In-order Traversal on a Binary Tree
- Post-order Traversal on a Binary Tree
- Pre-order Traversal on a Binary Tree
Vectors
- Vector2D
Note: Every implementation in this repository is accompanied by a set of unit tests to ensure functionality and reliability. Check the respective test files for each data structure and algorithm.
These instructions will get you a copy of the project up and running on your local machine for development. See deployment for notes on how to deploy the project on a live system.
git clone [email protected]:stambolievv/DataStructures-And-Algorithms.git
Run npm install
from the terminal
Open the terminal and run the desired command
Type | Terminal Command | Description |
---|---|---|
dev | npm run dev |
Run development server for live editing |
prod | npm run build |
Build the project for production deployment |
prod + preview | npm run preview |
Preview the production build locally before deployment |
tests | npm run test |
Run unit tests for all data structures and algorithms |
This project is licensed under the Apache-2.0 License - see the LICENSE file for details