An open API service indexing awesome lists of open source software.

https://github.com/zmitry/struct

Basic and advanced data structures implemented with typescript
https://github.com/zmitry/struct

datastructures graph lru pairing-heap

Last synced: 2 months ago
JSON representation

Basic and advanced data structures implemented with typescript

Awesome Lists containing this project

README

          








Data structures library













npm package


npm downloads



Collection of essential data structures for web development..










yarn add @zmitry/struct







- [**Graph**](./src/graph/Readme.md)
- [`createGraph`](./src/graph/Readme.md) — graph data structure
- [`createCompoundGraph`](./src/graph/Readme.md) — hierarchal graph




- [**Advanced graph algorithms**](./src/graph-alg/Readme.md)
- [`dfs`](./src/graph-alg/dfs.ts) — depth first graph traversal
- [`topologicalSort`](./src/graph-alg/topological-stort-kahn.ts) — Kahn topological sort
- [`connectedComponents`](./src/graph-alg/components.ts) — connected components algorithm




- [**Primitive**](./src/index.ts)
- [`createHeap`](./src/pairing-heap.ts) — Pairing heap implementation.
- [`LRUCache`](./src/LRUCache.ts) — LRU cache implementation










Roadmap


- [x] LRU Cache
- LRU with ttl
- [x] Graph data structure without parent/multigraph support
- [x] Topological sort
- [x] Pairing heap using linked list
- Priority queue
- link-cut tree