# awangdev/leet-code

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/awangdev-leet-code).**

4,344 stars · 30 forks · Java

## Links

- GitHub: https://github.com/awangdev/leet-code
- awesome-repositories: https://awesome-repositories.com/repository/awangdev-leet-code.md

## Topics

`algorithm` `dynamicprogramming` `java` `java-solution` `leetcode` `lintcode`

## Description

This project is a curated reference library of algorithmic patterns, data structure implementations, and system design notes. It serves as a Java algorithmic problem set and a competitive programming guide, providing a collection of solutions for coding challenges from platforms like LeetCode and LintCode.

The library is distinguished by its comprehensive set of Java implementations for advanced data structures and algorithmic strategies. It includes detailed references for solving complex problems with accompanying time and space complexity analysis.

The project covers a broad surface of computer science fundamentals, including algorithm design, data structure implementation, and system design. Its contents span graph theory, dynamic programming, search and optimization, and linear data processing techniques. It also includes notes on infrastructure scalability, performance caching, and software architecture patterns.

## Tags

### Education & Learning Resources

- [Custom Data Structure Implementations](https://awesome-repositories.com/f/education-learning-resources/data-structure-design/custom-data-structure-implementations.md) — Provides practical Java implementations of specialized data structures like Tries and Segment Trees with complexity analysis. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Pattern-Based Algorithm Categorization](https://awesome-repositories.com/f/education-learning-resources/pattern-based-algorithm-categorization.md) — Implements a categorized library of algorithmic patterns including dynamic programming, sliding windows, and backtracking.
- [Binary Search Patterns](https://awesome-repositories.com/f/education-learning-resources/binary-search-patterns.md) — A collection of iterative and recursive search patterns used to find targets or optimal boundaries in sorted datasets. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Data Structures Reference](https://awesome-repositories.com/f/education-learning-resources/data-structures-reference.md) — Provides a reference library of custom Java implementations for advanced data structures like Tries, Heaps, and Segment Trees.
- [Java Implementation References](https://awesome-repositories.com/f/education-learning-resources/data-structures-reference/java-implementation-references.md) — Provides concrete Java reference implementations for standard data structures such as Heaps and Tries.
- [Advanced DP Patterns](https://awesome-repositories.com/f/education-learning-resources/dynamic-programming-patterns/advanced-dp-patterns.md) — Ships a suite of optimization and counting solutions using sequence, interval, and coordinate-based dynamic programming. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Graph Traversal Algorithms](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/data-ordering-and-retrieval/graph-traversal-algorithms.md) — Implements algorithms for visiting vertices in graphs, including breadth-first and depth-first searches. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Algorithmic Problem Sets](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/general-collections-and-study/algorithmic-problem-sets.md) — Offers a curated collection of Java solutions for algorithmic problems from platforms like LeetCode and LintCode.
- [Balanced Search Trees](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/data-structure-implementations/data-structures/balanced-search-trees.md) — Implements self-balancing search trees that ensure logarithmic time complexity for search and insertion. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [General List Sorting](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/data-structure-implementations/data-structures/ordered-lists/sorted-list-maintenance/general-list-sorting.md) — Provides implementations for ordering elements in lists using various sorting algorithms and comparison logic. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Prefix Trees](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/data-structure-implementations/data-structures/prefix-trees.md) — Implements trie data structures for efficient string-based retrieval and prefix validation. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Connected Component Analysis](https://awesome-repositories.com/f/education-learning-resources/graph-algorithms/graph-connectivity-analysis/connected-component-analysis.md) — Implements algorithms for grouping nodes into reachable sets and detecting cycles in undirected graphs. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Graph Search Implementations](https://awesome-repositories.com/f/education-learning-resources/graph-problem-solving/graph-search-implementations.md) — Provides techniques for exploring nodes using depth-first search for exhaustive visits and breadth-first search for shortest paths. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Two-Pointer Techniques](https://awesome-repositories.com/f/education-learning-resources/problem-solving-guides/interview-problem-solving/two-pointer-techniques.md) — Implements two-pointer techniques, including fast-slow and collision pointers, for optimized linear scans. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Sliding Window Algorithms](https://awesome-repositories.com/f/education-learning-resources/sliding-window-algorithms.md) — Provides sliding window algorithms for efficiently processing contiguous subarrays and substrings. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Recursive Problem Solving](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/computer-science-education/algorithmic-problem-solving/recursive-problem-solving.md) — Implements techniques to decompose complex problems into simpler sub-problems through systematic recursive state transitions. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Memoization Techniques](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/computer-science-education/algorithmic-problem-solving/recursive-problem-solving/memoization-techniques.md) — Implements memoization techniques to optimize recursive calculations in dynamic programming.
- [Technical Interview Preparation](https://awesome-repositories.com/f/education-learning-resources/technical-interview-preparation.md) — Provides a comprehensive set of Java implementations and algorithmic patterns for technical interview preparation.
- [Bit Manipulation Algorithms](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/bit-manipulation-algorithms.md) — Implements bitwise logic operations and algorithms for low-level data manipulation. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Combinatorial Generation](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/computer-science-education/algorithmic-problem-solving/recursive-problem-solving/combinatorial-generation.md) — Implements algorithms for generating all possible permutations, subsets, and combinations through recursive exploration. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))

### Data & Databases

- [Graph Data Models](https://awesome-repositories.com/f/data-databases/graph-data-models.md) — Provides graph representations using adjacency lists and matrices to manage network nodes and edges. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Least Recently Used Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching/least-recently-used-caches.md) — Implements a least recently used cache using a hash map and doubly linked list for constant-time access. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Data Replication](https://awesome-repositories.com/f/data-databases/data-replication.md) — Provides notes and implementations for synchronizing data across distributed database nodes via replication. ([source](https://github.com/awangdev/leet-code/blob/master/SystemDesign.md))
- [In-Memory Caches](https://awesome-repositories.com/f/data-databases/in-memory-caches.md) — Provides concepts and implementations for memory-based data caching to reduce latency. ([source](https://github.com/awangdev/leet-code/blob/master/SystemDesign.md))
- [Nested List Flattening](https://awesome-repositories.com/f/data-databases/nested-data-manipulations/nested-list-flattening.md) — Provides recursive methods to convert multi-level nested list structures into linear sequences. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Logical Data Partitioning](https://awesome-repositories.com/f/data-databases/volume-based-partitioning/logical-data-partitioning.md) — Implements logical dataset partitioning for splitting data across multiple servers to improve performance. ([source](https://github.com/awangdev/leet-code/blob/master/SystemDesign.md))

### Development Tools & Productivity

- [Competitive Programming Repositories](https://awesome-repositories.com/f/development-tools-productivity/competitive-programming-repositories.md) — Provides a categorized source code collection of optimized solutions for LeetCode and LintCode challenges.

### Programming Languages & Runtimes

- [Double-Ended Queues](https://awesome-repositories.com/f/programming-languages-runtimes/double-ended-queues.md) — Implements double-ended queues supporting constant-time insertions and deletions at both ends. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Segment Trees](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/hierarchical-tree-structures/segment-trees.md) — Provides segment tree implementations for performing range queries and updates in logarithmic time. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Quickselect Implementations](https://awesome-repositories.com/f/programming-languages-runtimes/list-manipulation-utilities/list-partitioning/quickselect-implementations.md) — Implements partition-based selection to find the k-th smallest element in an unordered list.
- [Edit Distance Calculators](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/string-utilities/string-manipulators/edit-distance-calculators.md) — Provides algorithms for computing the minimum number of operations required to transform one string into another. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))

### Scientific & Mathematical Computing

- [Binary Search Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/binary-search-algorithms.md) — Implements algorithms that repeatedly divide a sorted search interval in half to locate a target value. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Backtracking Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/algorithms/algorithmic-learning-resources/backtracking-algorithms.md) — Provides algorithmic strategies for solving constraint satisfaction problems by systematically exploring potential solution paths. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Greedy](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/algorithms/greedy.md) — Implements algorithms that make locally optimal choices at each step to find a global optimum. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Prefix Sum Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/prefix-sum-algorithms.md) — Implements prefix sum algorithms to enable efficient constant-time subarray sum queries. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Recursive Tree Traversal Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/recursive-tree-traversal-algorithms.md) — Provides recursive depth-first traversal algorithms for visiting nodes in hierarchical structures.
- [Binary Tree Traversals](https://awesome-repositories.com/f/scientific-mathematical-computing/recursive-tree-traversal-algorithms/binary-tree-traversals.md) — Provides standard visitation patterns including preorder, inorder, and postorder for binary trees. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Sorting Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/sorting-algorithms.md) — Provides implementations of fundamental sorting algorithms including Quick Sort, Merge Sort, Bucket Sort, and Radix Sort. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Subarray Sum Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/subarray-sum-algorithms.md) — Implements computational methods for calculating and counting subarray sums using prefix sum techniques. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Bitwise Manipulation Utilities](https://awesome-repositories.com/f/scientific-mathematical-computing/bitwise-manipulation-utilities.md) — Provides low-level operations using bitwise logic to solve algorithmic problems. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Greedy Optimization Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/greedy-optimization-algorithms.md) — Implements greedy optimization algorithms for efficient resource allocation and scheduling. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Sweep-Line Processing](https://awesome-repositories.com/f/scientific-mathematical-computing/interval-representations/sweep-line-processing.md) — Implements sweep-line processing for solving geometric interval and overlapping range problems. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Cycle Detection](https://awesome-repositories.com/f/scientific-mathematical-computing/linked-list-cycle-detectors/cycle-detection.md) — Implements cycle detection in linked lists using pointer-based verification. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Shortest Path Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/algorithms/graph-processing/shortest-path-algorithms.md) — Provides algorithms used to calculate the most efficient path between nodes in a graph. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Longest Palindromic Substring Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/string-algorithms/palindromic-sequence-analyzers/longest-palindromic-substring-algorithms.md) — Implements algorithms for identifying the longest palindromic sequence within strings. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Quickselect Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/quickselect-algorithms.md) — Provides algorithms used to find the kth smallest or largest element in an unordered list. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Topological Sorting](https://awesome-repositories.com/f/scientific-mathematical-computing/topological-sorting.md) — Implements algorithms for determining a linear ordering of nodes in a directed acyclic graph. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))

### Software Engineering & Architecture

- [Algorithmic Problem Solving](https://awesome-repositories.com/f/software-engineering-architecture/algorithmic-problem-solving.md) — Offers a comprehensive set of Java solutions for complex algorithmic challenges including DP and backtracking.
- [Common Ancestor Algorithms](https://awesome-repositories.com/f/software-engineering-architecture/common-ancestor-algorithms.md) — Implements algorithms to identify the lowest shared ancestor node of two given nodes in a tree. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Complexity Analysis](https://awesome-repositories.com/f/software-engineering-architecture/complexity-analysis.md) — Includes detailed time and space complexity analysis for evaluating the efficiency of implemented algorithms. ([source](https://github.com/awangdev/leet-code/blob/master/TagREADME.md))
- [Disjoint Set Union](https://awesome-repositories.com/f/software-engineering-architecture/disjoint-set-union.md) — Implements data structures for tracking and merging non-overlapping sets to determine connectivity. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Dynamic Programming Techniques](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-programming-techniques.md) — Implements a problem-solving approach that breaks problems into overlapping subproblems and caches results. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Heaps](https://awesome-repositories.com/f/software-engineering-architecture/heaps.md) — Provides binary heap implementations for tracking top-K elements and maintaining ordered streams. ([source](https://github.com/awangdev/leet-code/blob/master/LevelReviewPage.md))
- [Heap Element Accessors](https://awesome-repositories.com/f/software-engineering-architecture/heaps/heap-element-accessors.md) — Implements efficient operations to retrieve minimum or maximum elements from heap-based collections. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Navigation Operations](https://awesome-repositories.com/f/software-engineering-architecture/linked-lists/navigation-operations.md) — Implements essential pointer-based operations for linked lists such as reversing, merging, and finding the middle node. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Priority Queues](https://awesome-repositories.com/f/software-engineering-architecture/queue-implementations/priority-queues.md) — Provides heap-based priority queue implementations for efficient retrieval of prioritized elements. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Trie Constructions](https://awesome-repositories.com/f/software-engineering-architecture/trie-constructions.md) — Implements the construction of prefix trees for efficient word insertion and search completion. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))
- [Two-Pointer Strategies](https://awesome-repositories.com/f/software-engineering-architecture/two-pointer-strategies.md) — Implements two-pointer strategies for optimized linear scanning of arrays and strings.
- [Design Pattern Implementations](https://awesome-repositories.com/f/software-engineering-architecture/design-pattern-implementations.md) — Provides practical Java implementations of established software design patterns like Singleton and Factory. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [LRU Cache Eviction](https://awesome-repositories.com/f/software-engineering-architecture/memory-management/lru-cache-eviction.md) — Implements an LRU cache using a hash map and doubly linked list for constant-time eviction.
- [Monotone Stack Algorithms](https://awesome-repositories.com/f/software-engineering-architecture/monotone-stack-algorithms.md) — Implements algorithms using a monotonic stack to find the nearest extreme element in linear time. ([source](https://github.com/awangdev/leet-code/blob/master/KnowledgeHash.md))
- [Priority Heaps](https://awesome-repositories.com/f/software-engineering-architecture/priority-heaps.md) — Provides priority heap implementations for efficient minimum and maximum element retrieval.
- [Topological Sorting](https://awesome-repositories.com/f/software-engineering-architecture/topological-sorting.md) — Implements dependency-based node ordering for processing nodes in a directed graph. ([source](https://github.com/awangdev/leet-code/blob/master/ReviewPage.md))

### Part of an Awesome List

- [System Design and Architecture](https://awesome-repositories.com/f/awesome-lists/devtools/system-design-and-architecture.md) — Includes architectural notes on load balancing, database replication, and horizontal scaling for system design.
- [System Design And Architecture](https://awesome-repositories.com/f/awesome-lists/learning/system-design-and-architecture.md) — Provides architectural summaries and strategies for scaling infrastructure and managing distributed data.

### DevOps & Infrastructure

- [Horizontal Scaling Strategies](https://awesome-repositories.com/f/devops-infrastructure/distributed-systems/horizontal-scaling-strategies.md) — Explains architectural methods for distributing traffic and storage to scale infrastructure horizontally. ([source](https://github.com/awangdev/leet-code/blob/master/SystemDesign.md))
- [Traffic Load Balancers](https://awesome-repositories.com/f/devops-infrastructure/traffic-load-balancers.md) — Covers the design and implementation of network traffic balancing to ensure high availability. ([source](https://github.com/awangdev/leet-code/blob/master/SystemDesign.md))
