Why another one? Native JS only gives us Array, Map, Set, Object. When you need a sorted map, priority queue, or graph algorithms, you're stuck with either: - Half-baked npm packages with poor TS support - Porting Java/C++ code yourself - Libraries that expose too many internals What's different:
1. Native API feel - TreeMap/TreeSet work like Map/Set, just sorted: 2. Java-style navigation - floor(), ceiling(), lower(), higher(), rangeSearch()
3. Full TypeScript - No any types, proper generics throughout
4. Performance - Red-Black Tree backed, ~2x faster iteration than js-sdsl
Included: - Binary Trees: BST, AVL, Red-Black, TreeMap, TreeSet, TreeMultiMap - Heaps: Min/Max Heap, Priority Queue - Graphs: Directed/Undirected with Dijkstra, Bellman-Ford, Tarjan, etc. - Linear: Queue, Deque, Stack, LinkedList - Others: Trie, HashMap
npm: npm install data-structure-typed
Happy to answer questions about implementation details, performance tradeoffs, or TypeScript typing challenges!