Skip to content

Latest commit

 

History

193 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 LeetCode Mastery & Data Structures Repository

Welcome to the LeetCode Solutions & Algorithm Knowledge Base. This repository serves as a systematic, high-performance vault of solved LeetCode problems (primarily in modern C++), paired with comprehensive theory notes, pattern guides, complexity breakdowns, and an automated master index.


🧭 Repository Navigation


📊 Solved Problems Tracker

Total Solved 🟢 Easy 🟡 Medium 🔴 Hard
204 3 1 200

📚 DSA Topic Guides

Topic Key Concepts Solved Count Link
:--- :--- :---: :---
Arrays & Hashing Hash Maps, Hash Sets, Prefix Sums, Kadane's 14 Explore Notes
Two Pointers Opposite Ends, Same Direction, Partitioning 2 Explore Notes
Sliding Window Fixed Window, Dynamic Window, Monotonic Queue 8 Explore Notes
Stack & Queue Monotonic Stack, Parentheses, Min-Stack, Queues 10 Explore Notes
Binary Search Classic BS, Search on Answer, Rotated Arrays 14 Explore Notes
Linked List Fast & Slow Pointers, Reversals, Dummy Nodes 4 Explore Notes
Trees & BST Traversals, LCA, BST properties, Segment Trees 8 Explore Notes
Heaps / Priority Queue Top-K Elements, Two Heaps Pattern, Merge K Lists 9 Explore Notes
Backtracking Permutations, Combinations, Subsets, Pruning 10 Explore Notes
Graphs BFS/DFS, Dijkstra, Topo Sort, Union-Find, Bellman-Ford 14 Explore Notes
Dynamic Programming 1D/2D DP, State Compression, Memoization 43 Explore Notes
Greedy Activity Selection, Jump Game, Huffman Coding 13 Explore Notes
Intervals Merging Intervals, Insert Intervals, Overlap Checks 4 Explore Notes
Bit Manipulation XOR properties, Bitmasks, Power of 2 checks 3 Explore Notes
Math & Geometry Modular Arithmetic, Number Theory, Geometry 30 Explore Notes

🛠️ How to Compile & Run Solutions Locally

All solutions are written in standard C++17/20 and include built-in test runners in main() with assertions guarded by #ifdef LOCAL_TEST:

# Compile locally with g++
g++ -std=c++17 -DLOCAL_TEST -O2 -Wall solutions/<id>-<slug>/solution.cpp -o solution.exe

# Run test cases
./solution.exe

Or on Linux / macOS / WSL:

clang++ -std=c++20 -DLOCAL_TEST -O2 -Wall solutions/<id>-<slug>/solution.cpp -o solution.out
./solution.out

Tip

You can safely copy and paste the entire solution.cpp file directly into LeetCode. Because main() is wrapped in #ifdef LOCAL_TEST, LeetCode's compiler will only execute class Solution without conflicting with LeetCode's internal test runner.

About

Practice and Documentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages