back to home

kamyu104 / LeetCode-Solutions

🏋️ Python / Modern C++ Solutions of All 3864 LeetCode Problems (Weekly Update)

5,165 stars
1,649 forks
45 issues
C++PythonTypeScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing kamyu104/LeetCode-Solutions in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/kamyu104/LeetCode-Solutions)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

LeetCode           • R.I.P. to my old Leetcode repository, where there were stars and forks (ever the top 3 in the field). • Since free questions may be even mistakenly taken down by some companies, only solutions will be post on now. • There are new LeetCode questions every week. I'll keep updating for full summary and better solutions. • For more problem solutions, you can see my LintCode, GoogleKickStart, GoogleCodeJamIO repositories. • For more challenging problem solutions, you can also see my GoogleCodeJam, MetaHackerCup repositories. • Hope you enjoy the journey of learning data structures and algorithms. • Notes: "🔒" means your subscription of LeetCode premium membership is required for reading the question. Solutions • 0001 - 1000 • 1001 - 2000 • 2001 - 3000 • 3001 - Latest Algorithms • Bit Manipulation • Array • String • Linked List • Stack • Queue • Binary Heap • Tree • Hash Table • Math • Sort • Two Pointers • Recursion • Binary Search • Binary Search Tree • Breadth-First Search • Depth-First Search • Backtracking • Dynamic Programming • Greedy • Graph • Geometry • Simulation • Constructive Algorithms • Design JavaScript • JS Database • SQL Pandas • PD Reference • Links Bit Manipulation | # | Title | Solution | Time | Space | Difficulty | Tag | Note| |-----|---------------- | --------------- | --------------- | --------------- | ------------- |--------------|-----| 3064 | Guess the Number Using Bitwise Questions I | C++ Python | _O(logn)_ | _O(1)_ | Medium |🔒| Bit Manipulation 3094 | Guess the Number Using Bitwise Questions II | C++ Python | _O(logr)_ | _O(1)_ | Medium |🔒| Bit Manipulation 3125 | Maximum Number That Makes Result of Bitwise AND Zero | C++ Python | _O(1)_ | _O(1)_ | Medium |🔒| Bit Manipulation 3133 | Minimum Array End | C++ Python | _O(logn)_ | _O(1)_ | Medium | | Bit Manipulation 3199 | Count Triplets with Even XOR Set Bits I | C++ Python | _O(nlogr)_ | _O(1)_ | Easy | 🔒 | Brute Force, Bit Manipulation, Parity 3215 | Count Triplets with Even XOR Set Bits II | C++ Python | _O(nlogr)_ | _O(1)_ | Medium | 🔒 | Bit Manipulation, Parity 3226 | Number of Bit Changes to Make Two Integers Equal | C++ Python | _O(logn)_ | _O(1)_ | Easy | | Bit Manipulation 3289 | The Two Sneaky Numbers of Digitville | C++ Python | _O(n)_ | _O(1)_ | Easy | | Bit Manipulation 3304 | Find the K-th Character in String Game I | C++ Python | _O(n)_ | _O(1)_ | Easy | | Bitmasks 3307| Find the K-th Character in String Game II | C++ Python | _O(1)_ | _O(1)_ | Hard | | Bitmasks 3314 | Construct the Minimum Bitwise Array I | C++ Python | _O(n)_ | _O(1)_ | Easy | | Bit Manipulation 3315 | Construct the Minimum Bitwise Array II | C++ Python | _O(n)_ | _O(1)_ | Medium | | Bit Manipulation 3344 | Maximum Sized Array | C++ Python | precompute: O(max_s^(1/5) * log(max_s)) runtime: O(log(max_s)) | _O(max_s^(1/5))_ | Medium | 🔒 | Precompute, Bitmasks, Combinatorics, Binary Search 3370 | Smallest Number With All Set Bits | C++ Python | _O(1)_ | _O(1)_ | Easy | | Bit Manipulation 3566 | Partition Array into Two Equal Product Subsets | C++ Python | _O(n * 2^n)_ | _O(1)_ | Medium | | Bitmasks 3632 | Subarrays with XOR at Least K | C++ Python | _O(nlogr)_ | _O(t)_ | Hard | 🔒 | Bitmasks, Prefix Sum, Trie 3646 | Next Special Palindrome Number | C++ Python | precompute: _O(9 * 2^9 + 16 * p + plogp)_ runtime: _O(logp)_ | _O(p)_ | Hard | | Precompute, Bitmasks, Sort, Binary Search 3702 | Longest Subsequence With Non-Zero Bitwise XOR | C++ Python | _O(n)_ | _O(1)_ | Medium | | Bitmasks 3750 | Minimum Number of Flips to Reverse Binary String | C++ Python | _O(logn)_ | _O(1)_ | Easy | | Bitmasks 3766 | Minimum Operations to Make Binary Palindrome | C++ Python | precompute: _O(sqrt(r) * logr)_ runtime: _O(r)_ | _O(r)_ | Medium | | Precompute, Bitmasks, Two Pointers 3769 | Sort Integers by Binary Reflection | C++ Python | _O(nlogr + nlogn)_ | _O(n)_ | Easy | | Sort, Bitmasks 3782 | Last Remaining Integer After Alternating Deletion Operations | C++ Python | _O(1)_ | _O(1)_ | Hard | | Bitmasks, Simulation 3827 | Count Monobit Integers | C++ Python | _O(logn)_ | _O(1)_ | Easy | | Bitmasks ⬆️ Back to Top Array | # | Title | Solution | Time | Space | Difficulty | Tag | Note| |-----|---------------- | --------------- | --------------- | --------------- | ------------- |--------------|-----| 3009 | Maximum Number of Intersections on the Chart | C++ Python | _O(nlogn)_ | _O(n)_ | Hard | 🔒 | Sort, Line Sweep, Coordinate Compression 3010 | Divide an Array Into Subarrays With Minimum Cost I | C++ Python | _O(n)_ | _O(1)_ | Easy | | Array, Quick Select 3015 | Count the Number of Houses at a Certain Distance I | C++ Python | _O(n)_ | _O(n)_ | Medium | | Math, Prefix Sum, Difference Array 3017 | Count the Number of Houses at a Certain Distance II | C++ Python | _O(n)_ | _O(1)_ | Hard | | Math, Prefix Sum, Difference Array 3026 | Maximum Good Subarray Sum | C++ Python | _O(n)_ | _O(n)_ | Medium | | Prefix Sum 3028 | Ant on the Boundary | C++ Python | _O(n)_ | _O(1)_ | Easy | | Prefix Sum 3030 | Find the Grid of Region Average | C++ Python | _O(m * n)_ | _O(m * n)_ | Medium | | Array 3033 | Modify the Matrix | C++ Python | _O(m * n)_ | _O(1)_ | Easy | | Array 3038 | Maximum Number of Operations With the Same Score I | C++ Python | _O(n)_ | _O(1)_ | Easy | | Array 3065 | Minimum Operations to Exceed Threshold Value I | C++ Python | _O(n)_ | _O(1)_ | Easy | | Array 3069 | Distribute Elements Into Two Arrays I | C++ Python | _O(n)_ | _O(n)_ | Easy | | Array 3070 | Count Submatrices with Top-Left Element and Sum Less Than k | C++ Python | _O(n * m)_ | _O(1)_ | Medium | | Array, Prefix Sum 3071 | Minimum Operations to Write the Letter Y on a Grid | C++ Python | _O(n^2)_ | _O(1)_ | Medium | | Array 3079 | Find the Sum of Encrypted Integers | C++ Python | _O(nlogr)_ | _O(1)_ | Easy | | Array 3096 | Minimum Levels to Gain More Points | C++ Python | _O(n)_ | _O(n)_ | Medium | | Prefix Sum 3105 |…