Skip to main content
Data Structures and Algorithms Hero

Master Data Structures and Algorithms

This library provides modern TypeScript implementations of essential data structures and algorithms, along with solved coding problems to help you master DSA concepts.

11 sorting algorithms

From bubble sort to topological sort, including merge sort, quick sort, and heap sort

10 data structures

Arrays, linked lists, stacks, queues, trees, heaps, graphs, and more

4 algorithm design patterns

Divide & conquer, dynamic programming, greedy algorithms, and backtracking

20+ solved problems

Real coding challenges solved using various data structures and algorithms

What’s Inside

This repository serves as both a learning playground and a practical reference for data structures and algorithms. Each implementation includes:
  • Clean, modern TypeScript code
  • Comprehensive test coverage
  • Time and space complexity analysis
  • Real-world coding problem solutions

Data Structures

Implementations of fundamental data structures:
  • Arrays - Dynamic array operations and manipulations
  • Linked Lists - Singly and doubly-linked list implementations
  • Stacks - LIFO data structure with push/pop operations
  • Queues - FIFO data structure with enqueue/dequeue operations
  • Trees - Binary trees, BST, and AVL trees
  • Binary Heaps - Min-heap and max-heap implementations
  • Graphs - Graph representation and traversal algorithms

Algorithms

A comprehensive collection of algorithms organized by category: Sorting: Bubble sort, insertion sort, selection sort, merge sort, quick sort, heap sort, bucket sort, counting sort, radix sort, cycle sort, and topological sort Searching: Linear search and binary search Graph Algorithms: Dijkstra’s shortest path algorithm Design Techniques: Divide and conquer, dynamic programming, greedy algorithms, and backtracking

Coding Problems

Each data structure and algorithm includes solved coding problems that demonstrate practical applications. Problems are organized by:
  • Data structure (array problems, tree problems, etc.)
  • Algorithm technique (greedy, dynamic programming, etc.)
Every solution includes time and space complexity analysis to help you understand the performance characteristics.

Quick Navigation

Data Structures

Explore arrays, linked lists, trees, heaps, and graphs

Algorithms

Learn sorting, searching, and graph algorithms

Problems

Browse 20+ solved coding problems

Getting Started

Installation

Set up the project on your local machine

Running Tests

Learn how to run and target specific tests

Built With

  • TypeScript - Type-safe implementations
  • Jest - Comprehensive test coverage
  • SWC - Fast TypeScript compilation and test execution

License

This project is licensed under the MIT License - see the LICENSE file for details.

Build docs developers (and LLMs) love