structalgo

StructAlgo


npm version Publish NPM Package

Repo that aspires to contain multiple data structures and algorithms for typescript. Feel free to add on to it, open PRs, and use it in your projects.


Documentation available here

NPMJS package info available here


Implementation Progress

Data Structures

  • Hash Set
  • Linked List
  • Ring Buffer
  • Stack
  • Tree Set
  • Graph
  • LRU Cache
  • Queue
  • AVL Tree
  • Heap
  • Trie
  • Binary Search Tree
  • Priority Queue
  • Deque (Double-ended Queue)
  • Bloom Filter
  • Disjoint Set (Union-Find)

Algorithms

  • Quick Sort
  • Bubble Sort
  • Bucket Sort
  • Counting Sort
  • Insertion Sort
  • Merge Sort
  • Radix Sort
  • Selection Sort
  • Heap Sort
  • Binary Search
  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Dijkstra's Algorithm
  • A* Algorithm
  • Kruskal's Algorithm
  • Prim's Algorithm

Future Work & Enhancements

The following features and improvements are planned for future releases:

Additional Data Structures

  • Red-Black Tree
  • B-Tree and B+ Tree
  • Suffix Tree and Suffix Array
  • Segment Tree
  • Fenwick Tree (Binary Indexed Tree)
  • Skip List
  • Fibonacci Heap
  • Van Emde Boas Tree

Additional Algorithms

  • Topological Sort
  • Bellman-Ford Algorithm
  • Floyd-Warshall Algorithm
  • Tarjan's Algorithm (Strongly Connected Components)
  • Kosaraju's Algorithm
  • Ford-Fulkerson Algorithm (Max Flow)
  • Knuth-Morris-Pratt (KMP) String Matching
  • Rabin-Karp String Matching
  • Boyer-Moore String Matching
  • Convex Hull (Graham Scan, Jarvis March)
  • Dynamic Programming classics (Knapsack, Longest Common Subsequence, etc.)

Improvements

  • Performance benchmarks for all implementations
  • More comprehensive test coverage
  • Interactive visualizations for algorithms
  • Better documentation with more examples
  • Support for custom comparators in more data structures
  • Iterator implementations for all data structures
  • Immutable versions of data structures

Generated using TypeDoc