Skip to content

TheeCryptoChad/dsa-mastery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DSA Mastery

A community-driven, open-source study guide for Data Structures & Algorithms — written entirely in TypeScript.

License: MIT PRs Welcome TypeScript Problems


What Is This?

DSA Mastery is an open-source repository of 216 curated algorithm problems across 12 core categories — each one written in the style of a real technical interview question.

Every problem includes:

  • A complete problem statement with real constraints
  • Multiple worked examples
  • A dedicated edge cases section
  • A full TypeScript solution with strict typing
  • A step-by-step explanation of the approach
  • Time and space complexity analysis
  • Runnable test cases

This is not a collection of bare code snippets. Every solution is a teaching document — designed so you actually understand the pattern, not just memorize an answer.


Who Is This For?

  • Software engineers preparing for technical interviews (FAANG, startups, anywhere)
  • CS students learning data structures and algorithms for the first time
  • Self-taught developers building a solid algorithmic foundation
  • Anyone who wants a free, high-quality, community-maintained alternative to paid platforms

No subscription. No paywall. Fork it, star it, contribute to it.


How to Use This Repository

Option 1 — Read on GitHub (easiest)

Browse the folders below. Every problem is a standalone Markdown file that renders beautifully in GitHub's UI.

Option 2 — Clone and Run Locally

git clone https://github.com/your-username/dsa-mastery.git
cd dsa-mastery
npm install
npm test

TypeScript solutions can be run directly:

npx ts-node 01-arrays-and-strings/easy/01-two-sum.ts

How to Navigate

category-folder/
├── README.md        ← category overview and full problem index
├── easy/            ← 10 problems
├── medium/          ← 5 problems
└── hard/            ← 3 problems

Start with a category README to see the full problem list, then open any problem file.


Categories

# Category Easy Medium Hard Total
01 Arrays & Strings 10 5 3 18
02 Linked Lists 10 5 3 18
03 Stacks & Queues 10 5 3 18
04 Binary Trees 10 5 3 18
05 Binary Search Trees 10 5 3 18
06 Graphs 10 5 3 18
07 Dynamic Programming 10 5 3 18
08 Sorting & Searching 10 5 3 18
09 Hash Tables & Sets 10 5 3 18
10 Heaps & Priority Queues 10 5 3 18
11 Two Pointers & Sliding Window 10 5 3 18
12 Recursion & Backtracking 10 5 3 18
Total 120 60 36 216

Study Roadmap

If you're starting from scratch, here's the recommended order:

Week 1–2:   Arrays & Strings → Hash Tables & Sets → Two Pointers & Sliding Window
Week 3–4:   Linked Lists → Stacks & Queues → Recursion & Backtracking
Week 5–6:   Binary Trees → Binary Search Trees → Heaps & Priority Queues
Week 7–8:   Graphs → Sorting & Searching → Dynamic Programming

Each week: solve Easy problems first, then revisit with Medium. Save Hard problems for after you've internalized the core patterns.


Difficulty Guide

Level What to Expect Time Goal
Easy One core concept, straightforward approach 10–15 min
Medium Combines 2 concepts, requires pattern recognition 20–35 min
Hard Complex state management, multi-step optimization 40–60 min

Contributing

We welcome contributions of all sizes — from fixing a typo to adding a whole new problem.

See CONTRIBUTING.md for the full guide including the problem file template, code style requirements, and PR process.

Quick start:

  1. Fork the repo
  2. Add your problem following the template
  3. Open a PR with title: Add: Problem Name (Difficulty) — Category

Community

  • Star this repo if it helps you — it helps others find it
  • Watch for updates as new problems are added
  • Share with anyone preparing for interviews

License

MIT — see LICENSE. Free to use, share, and build upon.


Built with care by the community, for the community.

About

Open-source Data Structures & Algorithms study guide in TypeScript — 216 LeetCode-style problems with full solutions, step-by-step explanations, and complexity analysis.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors