Leetcode
LeetCode solutions, written in python and cpp(LeetCode解题报告,记录自己的leetcode成长之路)
Install / Use
/learn @geemaple/LeetcodeREADME
算法/Algorithm
微信公众号: 极客算法(GeekPal)
LeetCode解题报告,记录自己的leetcode成长之路
LeetCode solutions, written in python and cpp
链接/Links
脚本/Script
pip install -r requirements.txt
python problem.py <leetcode/lintcode> [-l java|cpp|python(default)] [-t]
# 例如(e.g.):
python problem.py https://leetcode.com/problems/online-stock-span/
python problem.py https://www.lintcode.com/problem/92 -l cpp
书籍/Books
- 《算法技术手册》/ Algorithms in a Nutshell
- 《STL源码剖析》/ The Annotated STL Sources
- 《算法心得:高效算法的奥秘》/ Hacker's Delight, 2nd Edition
- 《数学之美》(A chinese version book by Doctor Wujun)
- 《编程之美 : 微软技术面试心得》(A chinese version book by Mircosoft Developers)
列表/List
| Status | List | Progress | Notes | | ----- | ----- | ----- | ----- | | [54%] | leetcode-google.md | 255/471 | 2 vips | | [56%] | leetcode-discuss.md | 48/85 | 1 vip | | [57%] | leetcode-75.md | 43/75 | - | | [61%] | leetcode-topics.md | 88/144 | - | | [74%] | test.md | 155/207 | 6 vips | | [88%] | leetcode-top-interview-150.md | 133/150 | - | | [95%] | neetcode150.md | 143/150 | - | | [✅] | 9c-advanced.md | 75/93 | 18 vips | | [✅] | 9c-dp.md | 42/45 | 3 vips | | [✅] | 9c-top.md | 55/57 | 2 vips | | [✅] | blind75.md | 77/77 | - | | [✅] | geekbang.md | 55/55 | - | | [✅] | grind102.md | 101/102 | 1 vip | | [✅] | grind169.md | 166/169 | 3 vips | | [✅] | grind75.md | 75/75 | - | | [✅] | leetcode-top-100-liked.md | 100/100 | - | | [✅] | leetcode101.md | 183/184 | 1 vip | | [🔲] | 9c-basic.md | 16/128 | 3 vips | | [🔲] | endlesscheng.md | 165/2214 | 6 vips | | [🔲] | leetcode-trending.md | 0/21 | - |
Solved: 1007 problems
类型/Category
- Math
- Probability
- Combinatorics
- Bit Manipulation
- Bitmask
- Simulation
- Enumeration
- Design
- Greedy
- Dynamic Programming
- Game Theory
- Binary Search
- Linked List
- Hash Table
- Rolling Hash
- Prefix Sum
- Stack
- Monotonic Stack
- Queue
- Monotonic Queue
- Heap
- Two Pointers
- Sliding Window
- Sorting
- Bucket Sort
- Index Sort
- Counting
- Quickselect
- Divide and Conquer
- Breadth-First Search
- Depth-First Search
- Topological Sort
- Shortest Path
- Backtracking
- Line Sweep
- Ordered Set
- Binary Search Tree
- Binary Indexed Tree
- Segment Tree
- Union Find
- Trie
Math
| Link | Problem(106) | Solution | Tag | Time | Space | Ref | | ----- | ----- | ----- | ----- | ----- | ----- | ----- | | Leetcode-679 | 24 Game | c++, python3 | Math | O(4! * 4 ^ 3) | O(1) | - | | Leetcode-415 | Add Strings | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-2 | Add Two Numbers | c++, python3 | Math | O(N + M) | O(1) | - | | Leetcode-3021 | Alice And Bob Playing Flower Game | c++, python3 | Math | O(1) | O(1) | - | | Leetcode-2818 | Apply Operations To Maximize Score | c++, python3 | Math | O((N + K) * logN) | O(Max) | - | | Leetcode-504 | Base 7 | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-224 | Basic Calculator | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-227 | Basic Calculator II | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-932 | Beautiful Array | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-1716 | Calculate Money In Leetcode Bank | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-3461 | Check If Digits Are Equal In String After Operations I | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-1780 | Check If Number Is A Sum Of Powers Of Three | c++, python3 | Math | O(LogN) | O(1) | - | | Leetcode-3274 | Check If Two Chessboard Squares Have The Same Color | c++, python3 | Math | O(1) | O(1) | - | | Leetcode-2523 | Closest Prime Numbers In Range | c++, python3 | Math | O(NloglogN) | O(N) | - | | Leetcode-1290 | Convert Binary Number In A Linked List To Integer | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-3280 | Convert Date To Binary | c++, python3 | Math | O(1) | O(1) | - | | Leetcode-1317 | Convert Integer To The Sum Of Two No Zero Integers | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-1922 | Count Good Numbers | c++, python3 | Math | O(LogN) | O(1) | - | | Leetcode-1399 | Count Largest Group | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-3433 | Count Mentions Per User | c++, python3 | Math | O(NLogN) | O(N) | - | | Leetcode-2364 | Count Number Of Bad Pairs | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-1248 | Count Number Of Nice Subarrays | c++, python3 | Math | O(N) | O(1) | - | | Leetcode-3623 | Count Number Of Trapezoids I | c++, python3 | Math | O(N) | O(N) | - | | Leetcode-3625 | Count Number Of Trapezoids II | [c++](./leetcode/3625.count-number-of-tr
