Skip to main content

Data Structures

A comprehensive TypeScript library of fundamental data structures with full implementations, test coverage, and problem-solving examples.

Core Data Structures

Array

Array manipulation patterns and problems

Singly Linked List

Linear data structure with forward-only traversal

Doubly Linked List

Bidirectional linked list with prev and next pointers

Stack

LIFO (Last In First Out) data structure

Queue

FIFO (First In First Out) data structure

Tree

General tree structure with multiple children

Binary Search Tree

Ordered binary tree for efficient searching

AVL Tree

Self-balancing binary search tree

Binary Heap

Priority queue implementation with heap property

Graph

Vertices and edges for modeling relationships

Quick Comparison

Data StructureAccessSearchInsertDeleteUse Case
ArrayO(1)O(n)O(n)O(n)Random access, fixed size
Linked ListO(n)O(n)O(1)O(1)Dynamic size, frequent insertions
StackO(n)O(n)O(1)O(1)LIFO operations, backtracking
QueueO(n)O(n)O(1)O(1)FIFO operations, scheduling
BSTO(log n)O(log n)O(log n)O(log n)Sorted data, range queries
AVL TreeO(log n)O(log n)O(log n)O(log n)Guaranteed balanced operations
Binary HeapO(1)O(n)O(log n)O(log n)Priority queues
Graph-O(V+E)O(1)O(1)Network modeling, relationships
All implementations support generic types and include comprehensive test coverage.

Features

  • Type-safe: Full TypeScript support with generics
  • Well-tested: Comprehensive test suites for all structures
  • Problem-solving: Includes real-world problem examples
  • Production-ready: Clean, maintainable code with proper encapsulation

Getting Started

Each data structure page includes:
  • Complete API documentation with method signatures
  • Time and space complexity analysis
  • Usage examples from actual implementation
  • Common problems and solutions
  • Links to source code
Choose a data structure from the cards above to explore its implementation details.

Build docs developers (and LLMs) love