Skip to content

Yola21/js-ds-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-ds-collection

A lightweight, modular, and TypeScript-first collection of commonly used data structures in JavaScript, built for learning, practice, and production use.

npm version GitHub license


✨ Features

  • 🧱 Classic data structures like Stack, Queue, LinkedList, Heap, Tree, Trie, Union-Find, Segment Tree
  • ⚡ Fully type-safe with TypeScript generics
  • 🧪 100% unit-tested with Vitest
  • 📦 Tree-shakable and ready for modern builds
  • 📚 Great for DSA practice, interviews, or educational use

📦 Installation

npm install js-ds-collection

Data Structures table of Contents

Data Structure Description Docs / Examples
Stack<T> LIFO structure with iterable support 📘 Stack Docs
Queue<T> Optimized FIFO queue using circular buffer 📘 Queue Docs
Dequeue<T> Insert/remove from both ends 📘 Dequeue Docs
LinkedList<T> Singly linked list 📘 LinkedList Docs
DoublyLinkedList<T> Bi-directional linked list 📘 DoublyLinkedList Docs
CircularLinkedList<T> Circular linked list 📘 DoublyLinkedList Docs
Heap<T> Generic min/max heap via comparator 📘 Heap Docs
UnionFind Disjoint-set with union by rank/size 📘 UnionFind Docs
SegmentTree<T> Fast range queries and point updates 📘 SegmentTree Docs
Trie Prefix tree for string search 📘 Trie Docs

About

A collection of clean, testable data structures in modern TypeScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published