Skip to content

The repository is organized by LeetCode problem, with language-specific solutions and consistent LeetCode-compatible signatures that emphasize STL-heavy C++ usage, Python readability, and occasional alternative languages

Notifications You must be signed in to change notification settings

Kushal-Sachdeva78/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

A collection of solutions to LeetCode problems — written mainly in C++, with several in Python, and a few in other languages. This repo tracks my problem-solving journey, focusing on clean, efficient, and well-structured code.


Repository Overview

  • Per-problem directories: Each folder (e.g., 1-two-sum, 417-pacific-atlantic-water-flow) contains the solutions and notes for a single LeetCode problem, keeping language-specific implementations scoped to that challenge.
  • Language-specific files: Most problems provide a C++ implementation that follows LeetCode’s Solution signature. Many also include Python versions that emphasize readability and leverage idiomatic features.
  • Documentation on demand: Numerous problem folders ship with mini README.md notes describing the chosen approach for quicker future review.

Languages Used

  • C++ — primary language with STL-driven approaches (vectors, maps, sets, priority queues) tuned for performance.
  • Python — secondary language when concise syntax or dynamic typing helps express the algorithm more clearly.
  • Others (occasional) — Java, JavaScript, or other languages for alternative perspectives while preserving LeetCode-friendly signatures.

Algorithmic Coverage

Covers almost every major LeetCode domain, including:

  • Arrays, Strings, Linked Lists, and interval manipulation
  • Hash Maps, Sets, Heaps, and priority queues
  • Two Pointers, Sliding Window, Stack, and Queue techniques
  • Recursion & Backtracking for combinatorics and search
  • Dynamic Programming (1D, 2D, bitmask/state-based)
  • Trees, Graphs, BFS/DFS, and union-find connectivity
  • Binary Search, Sorting, and Greedy Algorithms
  • Bit Manipulation, Math, and Number Theory
  • Prefix Sums, Monotonic Structures, and advanced DP patterns

Basically — everything LeetCode has to offer.


Implementation Practices

  • Consistency with LeetCode interfaces: Classes and method signatures mirror the platform, enabling quick submission without refactoring.
  • Modular helpers: Larger challenges break logic into helper routines (validators, recursive explorers) to keep solutions readable.
  • Performance awareness: Solutions deliberately balance time/space trade-offs—using in-place updates, hashing, or sorting where it matters.

Opportunities to Grow

  • Unified testing harness: Add GoogleTest/pytest scaffolding to exercise solutions locally.
  • Complexity notes or benchmarks: Document time/space expectations alongside each solution for faster recall.
  • Language parity: Expand Python or other-language counterparts to complement C++-only problems.
  • Lightweight CI: Lint and test across languages to keep the repository evergreen.

Goal

To master problem patterns, strengthen data structures & algorithms intuition, and build consistency through practice.


Connect


Star the repo if you’re on the same grind — consistency beats luck.

About

The repository is organized by LeetCode problem, with language-specific solutions and consistent LeetCode-compatible signatures that emphasize STL-heavy C++ usage, Python readability, and occasional alternative languages

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published