Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polossk/leetcode-oj-solution
simple solution for leetcode
https://github.com/polossk/leetcode-oj-solution
cpp leetcode leetcode-solutions python3 ruby
Last synced: about 1 month ago
JSON representation
simple solution for leetcode
- Host: GitHub
- URL: https://github.com/polossk/leetcode-oj-solution
- Owner: polossk
- License: other
- Created: 2016-01-31T13:47:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-07T06:48:26.000Z (about 3 years ago)
- Last Synced: 2024-10-11T21:12:27.322Z (3 months ago)
- Topics: cpp, leetcode, leetcode-solutions, python3, ruby
- Language: C++
- Homepage:
- Size: 590 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeetCode OJ Solution
[![CC-BY-NC-SA-4.0](CC-BY-NC-SA.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![leetcode.com](materials/HomePage-leetcode.com-brightgreen.svg)](https://leetcode.com/problemset/algorithms/)
[![leetcode-cn.com](materials/CN_HomePage-leetcode--cn.com-brightgreen.svg)](https://leetcode-cn.com/problemset/algorithms/)## Progress // 当前进度
| | LeetCode`#` | CCI`*` | COF`**` |
| :-------------------------------------- | ----------: | -----: | ------: |
| ![Total](materials/-Total-007ec6.svg) | 1444 (8) | 109 | 75 |
| ![Easy](materials/-Easy-5cb85c.svg) | 53 (2) | 2 | 2 |
| ![Medium](materials/-Medium-f0ad4e.svg) | 95 (3) | 2 | 2 |
| ![Hard](materials/-Hard-e05d44.svg) | 26 (0) | 1 | 1 |
| ![Solved](materials/-Solved-8a2be2.svg) | 174 (5) | 5 | 5 |* `#` Some problems are locked by leetcode. The number in brackets is solved. // 部分题目被锁,括号内是其数目
* `*` CCI is the abbreviation of "Cracking the Coding Interview", here is the [portal](https://leetcode-cn.com/problemset/lcci/) // CCI 是《程序员面试金典》的题库,传送链接已附上
* `**` COF is the abbreviation of "Coding Interviews: Questions, Analysis and Solutions", here is the [portal](https://leetcode-cn.com/problemset/lcof/) // COF 是《剑指 Offer(第 2 版)》的题库,传送链接已附上## Solutions // 刷题成果
* LeetCode (Total):
![cpp](https://img.shields.io/badge/cpp-174-f34b7d.svg)
![python](https://img.shields.io/badge/python-47-3572A5.svg)
![ruby](https://img.shields.io/badge/ruby-43-701516.svg)
![java](https://img.shields.io/badge/java-4-b07219.svg)
![haskell](https://img.shields.io/badge/haskell-1-5e5086.svg)* LeetCode Locked Problems:
![cpp](https://img.shields.io/badge/cpp-5-f34b7d.svg)
![python](https://img.shields.io/badge/python-2-3572A5.svg)
![ruby](https://img.shields.io/badge/ruby-2-701516.svg)* CCI:
![cpp](https://img.shields.io/badge/cpp-5-f34b7d.svg)* COF:
![cpp](https://img.shields.io/badge/cpp-5-f34b7d.svg)* Unreleased: None
* The C++ solution is currently the way I work through the Leetcode // 我现在主要用 C++ 刷题
* *Haskell solution is just for fun :)* // 偶尔也会用 Haskell 水一些题
* The Archive **Unreleased** is for some problem somehow it shows up for practicing but does **not** list up in the problem set. It is rare to find one, and it will be moved into the problem set after its release.## Solved Problem List // 题目列表
| Archive | AC/TTL | Archive | AC/TTL | Archive | AC/TTL | Archive | AC/TTL |
| ------- | ---------: | ------- | -----: | ------- | ---------: | ------- | ---------: |
| **0** | 52 | **1** | 29 | **2** | 24/99(0/1) | **3** | 13/99(0/1) |
| **4** | 10/99(0/1) | **5** | 7 | **6** | 3 | **7** | 6 |
| **8** | 6 | **9** | 5 | **10** | 7 | **11** | 4 |
| **12** | 2 | **13** | 0 | **14** | 1/95(5/5) | | |* Each *Archive* contains 100 problems.
* *several questions were locked*, pattern `a/b (c/d)` means that accepted `a` problems within `b` problems, moveover, accepted `c` locked problems within `d` problems.### Archive#00: Problem 001 ~ Problem 100
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ----------------------------------------------------- | :---: | :----: | :---: | :---: |
| 001 | Easy | [Two Sum][001] | :o: | :o: | :o: | |
| 002 | Medium | [Add Two Numbers][002] | :o: | :o: | :o: | |
| 003 | Medium | [Longest Substring Without Repeating Characters][003] | :o: | | | |
| 004 | Hard | [Median of Two Sorted Arrays][004] | :o: | :o: | :o: | |
| 005 | Medium | [Longest Palindromic Substring][005] | :o: | | :o: | |
| 006 | Hard | [ZigZag Conversion][006] | :o: | :o: | :o: | |
| 007 | Easy | [Reverse Integer][007] | :o: | | | |
| 008 | Medium | [String to Integer (atoi)][008] | :o: | | | |
| 009 | Easy | [Palindrome Number][009] | :o: | | | |
| 010 | Hard | [Regular Expression Matching][010] | :o: | | | |
| 011 | Medium | [Container With Most Water][011] | :o: | | | |
| 012 | Medium | [Integer to Roman][012] | :o: | | | |
| 013 | Easy | [Roman to Integer][013] | :o: | | | |
| 014 | Easy | [Longest Common Prefix][014] | :o: | | | |
| 015 | Medium | [3Sum][015] | :o: | | | |
| 016 | Medium | [3Sum Closest][016] | :o: | | | |
| 017 | Medium | [Letter Combinations of a Phone Number][017] | :o: | :o: | :o: | |
| 019 | Medium | [Remove Nth Node From End of List][019] | :o: | :o: | :o: | |
| 020 | Easy | [Valid Parentheses][020] | :o: | | | |
| 021 | Easy | [Merge Two Sorted Lists][021] | :o: | | :o: | |
| 022 | Medium | [Valid Parentheses][022] | :o: | | | |
| 023 | Hard | [Merge k Sorted Lists][023] | :o: | :o: | :o: | |
| 024 | Medium | [Swap Nodes in Pairs][024] | :o: | | :o: | |
| 025 | Hard | [Reverse Nodes in k-Group][025] | :o: | | | |
| 029 | Medium | [Divide Two Integers][029] | :o: | | | |
| 031 | Medium | [Next Permutation][031] | :o: | :o: | | |
| 032 | Hard | [Longest Valid Parentheses][031] | :o: | :o: | | |
| 033 | Medium | [Search in Rotated Sorted Array][033] | :o: | | | |
| 039 | Medium | [Combination Sum][039] | :o: | | | |
| 042 | Hard | [Trapping Rain Water][042] | :o: | :o: | :o: | |
| 044 | Hard | [Wildcard Matching][044] | :o: | | | |
| 045 | Hard | [Jump Game II][045] | :o: | | | |
| 046 | Medium | [Permutations][046] | :o: | | | |
| 049 | Medium | [Group Anagrams][049] | :o: | :o: | :o: | |
| 050 | Medium | [Pow(x, n)][050] | :o: | | | |
| 053 | Easy | [Maximum Subarray][053] | :o: | :o: | :o: | |
| 055 | Medium | [Jump Game][055] | :o: | | | |
| 056 | Medium | [Merge Intervals][056] | :o: | | | |
| 061 | Medium | [Rotate List][061] | :o: | | :o: | |
| 064 | Medium | [Minimum Path Sum][064] | :o: | | | |
| 065 | Hard | [Valid Number][065] | :o: | :o: | :o: | |
| 068 | Hard | [Text Justification][068] | :o: | :o: | | |
| 069 | Easy | [Sqrt(x)][069] | :o: | | | |
| 072 | Hard | [Edit Distance][072] | :o: | | | |
| 074 | Medium | [Search a 2D Matrix][074] | :o: | | | |
| 081 | Medium | [Search in Rotated Sorted Array II][081] | :o: | | | |
| 082 | Medium | [Remove Duplicates from Sorted List II][082] | :o: | :o: | :o: | :o: |
| 083 | Easy | [Remove Duplicates from Sorted List][083] | :o: | :o: | :o: | :o: |
| 086 | Medium | [Partition List][086] | :o: | :o: | :o: | :o: |
| 091 | Medium | [Decode Ways][091] | :o: | | | |
| 093 | Medium | [Restore IP Addresses][093] | :o: | | | |
| 098 | Medium | [Validate Binary Search Tree][098] | :o: | | | |
| 100 | | | | | | |### Archive#01: Problem 101 ~ Problem 200
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ------------------------------------------ | :---: | :----: | :---: | :---: |
| 104 | Easy | [Maximum Depth of Binary Tree][104] | :o: | :o: | :o: | |
| 121 | Easy | [Best Time to Buy and Sell Stock][121] | :o: | | | |
| 122 | Easy | [Best Time to Buy and Sell Stock II][122] | :o: | :o: | | |
| 123 | Hard | [Best Time to Buy and Sell Stock III][123] | :o: | | | |
| 124 | Hard | [Binary Tree Maximum Path Sum][124] | :o: | | | |
| 125 | Easy | [Valid Palindrome][125] | :o: | :o: | :o: | |
| 126 | Hard | [Word Ladder II][126] | :o: | | | |
| 127 | Medium | [Word Ladder][127] | :o: | | | |
| 130 | Medium | [Surrounded Regions][130] | :o: | | | |
| 133 | Medium | [Clone Graph][133] | :o: | | | |
| 136 | Easy | [Single Number][136] | :o: | :o: | :o: | |
| 137 | Medium | [Single Number II][137] | :o: | :o: | :o: | |
| 139 | Medium | [Word Break][139] | :o: | | | |
| 141 | Easy | [Linked List Cycle][141] | :o: | | | |
| 142 | Medium | [Linked List Cycle II][142] | :o: | | | |
| 143 | Medium | [Reorder List][143] | :o: | | | |
| 146 | Medium | [Evaluate Reverse Polish Notation][146] | :o: | | | |
| 149 | Hard | [Max Points on a Line][149] | :o: | | | |
| 150 | Medium | [Evaluate Reverse Polish Notation][150] | :o: | | | |
| 151 | Medium | [Reverse Words in a String][151] | :o: | | | |
| 152 | Easy | [Maximum Subarray][152] | :o: | :o: | :o: | |
| 155 | Medium | [Min Stack][155] | :o: | | | |
| 165 | Medium | [Compare Version Numbers][165] | :o: | | | |
| 166 | Medium | [Fraction to Recurring Decimal][166] | :o: | | | |
| 169 | Easy | [Majority Element][169] | :o: | :o: | | |
| 188 | Hard | [Best Time to Buy and Sell Stock IV][188] | :o: | | | |
| 189 | Easy | [Rotate Array][189] | :o: | :o: | :o: | |
| 199 | Medium | [Binary Tree Right Side View][199] | :o: | | :o: | |
| 200 | Medium | [Number of Islands][200] | :o: | | | |### Archive#02: Problem 201 ~ Problem 300
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ----------------------------------------------------- | :---: | :----: | :---: | :---: |
| 201 | Medium | [Bitwise AND of Numbers Range][201] | :o: | | :o: | |
| 202 | Easy | [Happy Number][202] | :o: | :o: | :o: | |
| 204 | Easy | [Count Primes][204] | :o: | | | |
| 208 | Medium | [Implement Trie (Prefix Tree)][208] | :o: | | | |
| 211 | Medium | [Add and Search Word - Data structure design][211] | :o: | | | |
| 218 | Hard | [The Skyline Problem][218] | :o: | | | |
| 220 | Medium | [Contains Duplicate III][220] | :o: | | | |
| 221 | Medium | [Maximal Square][221] | :o: | | | |
| 224 | Hard | [Basic Calculator][224] | :o: | | | |
| 225 | Easy | [Implement Stack using Queues][225] | :o: | | | |
| 226 | Easy | [Invert Binary Tree][226] | :o: | | :o: | |
| 227 | Medium | [Basic Calculator II][227] | :o: | | | |
| 231 | Easy | [Power of Two][231] | :o: | | :o: | |
| 235 | Easy | [Lowest Common Ancestor of a Binary Search Tree][235] | :o: | :o: | :o: | |
| 236 | Medium | [Lowest Common Ancestor of a Binary Tree][236] | :o: | | | |
| 238 | Medium | [Product of Array Except Self][238] | :o: | | | |
| 241 | Medium | [Different Ways to Add Parentheses][241] | :o: | :o: | :o: | |
| 260 | Medium | [Single Number III][260] | :o: | :o: | :o: | |
| 273 | Hard | [Integer to English Words][273] | :o: | | | |
| 278 | Easy | [First Bad Version][278] | :o: | | | |
| 279 | Medium | [Perfect Squares][279] | :o: | | | |
| 283 | Easy | [Move Zeroes][283] | :o: | :o: | :o: | |
| 289 | Medium | [Game of Life][289] | :o: | | | |
| 300 | Medium | [Longest Increasing Subsequence][300] | :o: | :o: | | |### Archive#03: Problem 301 ~ Problem 400
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ---------------------------------------------------- | :---: | :----: | :---: | :---: |
| 306 | Medium | [Additive Number][306] | :o: | :o: | | |
| 307 | Medium | [Range Sum Query - Mutable][307] | :o: | | | |
| 309 | Medium | [Best Time to Buy and Sell Stock with Cooldown][309] | :o: | | | |
| 315 | Hard | [Count of Smaller Numbers After Self][315] | :o: | | | |
| 318 | Medium | [Maximum Product of Word Lengths][318] | :o: | | | |
| 327 | Hard | [Count of Range Sum][327] | :o: | | | |
| 355 | Medium | [Design Twitter][355] | :o: | | | |
| 365 | Medium | [Water and Jug Problem][365] | :o: | :o: | | |
| 367 | Easy | [Valid Perfect Square][367] | :o: | | | |
| 383 | Easy | [Ransom Note][383] | :o: | | | |
| 385 | Medium | [Mini Parser][385] | :o: | :o: | :o: | |
| 387 | Easy | [First Unique Character in a String][387] | :o: | | | |
| 394 | Medium | [Decode String][394] | :o: | :o: | :o: | |
| 400 | | | | | | |### Archive#04: Problem 401 ~ Problem 500
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ------------------------------ | :---: | :----: | :---: | :---: |
| 409 | Easy | [Longest Palindrome][409] | :o: | :o: | :o: | |
| 415 | Easy | [Add Strings][415] | :o: | :o: | | |
| 420 | Hard | [Strong Password Checker][420] | :o: | | | |
| 445 | Medium | [Add Two Numbers II][445] | :o: | | | |
| 464 | Medium | [Can I Win][464] | :o: | | | |
| 466 | Hard | [Count The Repetitions][466] | :o: | | | |
| 468 | Medium | [Validate IP Address][468] | :o: | | | |
| 476 | Easy | [Number Complement][476] | :o: | | | |
| 493 | Hard | [Reverse Pairs][493] | :o: | | | |
| 494 | Medium | [Target Sum][494] | :o: | | | |
| 500 | | | | | | |### Archive#05: Problem 501 ~ Problem 600
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | --------------------------------------- | :---: | :----: | :---: | :---: |
| 525 | Medium | [Contiguous Array][525] | :o: | | | |
| 540 | Medium | [Single Element in a Sorted Array][540] | :o: | | :o: | |
| 541 | Easy | [Reverse String II][541] | :o: | | | |
| 542 | Medium | [01 Matrix][542] | :o: | | | |
| 543 | Easy | [Diameter of Binary Tree][543] | :o: | :o: | | |
| 560 | Medium | [Subarray Sum Equals K][560] | :o: | | | |
| 572 | Easy | [Subtree of Another Tree][572] | :o: | | | |
| 600 | | | | | | |### Archive#06: Problem 601 ~ Problem 700
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ------------------------------- | :---: | :----: | :---: | :---: |
| 622 | Medium | [Design Circular Queue][622] | :o: | | | |
| 678 | Medium | [Valid Parenthesis String][678] | :o: | | | |
| 695 | Medium | [Max Area of Island][695] | :o: | | | |
| 700 | | | | | | |### Archive#07: Problem 701 ~ Problem 800
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | ----------------------------------------------------------- | :---: | :----: | :---: | :---: |
| 714 | Medium | [Best Time to Buy and Sell Stock with Transaction Fee][714] | :o: | | | |
| 733 | Easy | [Flood Fill][733] | :o: | | | |
| 735 | Medium | [Asteroid Collision][735] | :o: | | | |
| 739 | Medium | [Daily Temperatures][739] | :o: | | | |
| 752 | Medium | [Open the Lock][752] | :o: | | | |
| 771 | Easy | [Jewels and Stones][771] | :o: | | | |
| 800 | | | | | | |### Archive#08: Problem 801 ~ Problem 900
| ID | Difficulty | Problem | cpp | python | ruby | java |
| --- | ---------- | -------------------------------- | :---: | :----: | :---: | :---: |
| 820 | Medium | [Short Encoding of Words][820] | :o: | | | |
| 836 | Easy | [Rectangle Overlap][836] | :o: | :o: | :o: | |
| 844 | Easy | [Backspace String Compare][844] | :o: | :o: | :o: | |
| 876 | Easy | [Middle of the Linked List][876] | :o: | | | |
| 887 | Easy | [Super Egg Drop][887] | :o: | | | |
| 892 | Easy | [Surface Area of 3D Shapes][892] | :o: | | | |
| 900 | | | | | | |### Archive#09: Problem 901 ~ Problem 1000
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | --------------------------------------------- | :---: | :----: | :---: | :---: |
| 912 | Medium | [Sort an Array][912] | :o: | :o: | :o: | :o: |
| 945 | Medium | [Minimum Increment to Make Array Unique][945] | :o: | | | |
| 983 | Medium | [Minimum Cost For Tickets][983] | :o: | | | |
| 993 | Easy | [Cousins in Binary Tree][993] | :o: | | | |
| 997 | Easy | [Find the Town Judge][997] | :o: | | | |
| 1000 | | | | | | |### Archive#10: Problem 1001 ~ Problem 1100
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | ------------------------------------------------------------ | :---: | :----: | :---: | :---: |
| 1008 | Medium | [Construct Binary Search Tree from Preorder Traversal][1008] | :o: | | | |
| 1009 | Easy | [Complement of Base 10 Integer][1009] | :o: | | | |
| 1013 | Easy | [Partition Array Into Three Parts With Equal Sum][1013] | :o: | :o: | | |
| 1046 | Easy | [Last Stone Weight][1046] | :o: | | | |
| 1049 | Medium | [Last Stone Weight II][1049] | :o: | | | |
| 1071 | Easy | [Greatest Common Divisor of Strings][1071] | :o: | :o: | | |
| 1095 | Hard | [Find in Mountain Array][1095] | :o: | | | |
| 1100 | | | | | | |### Archive#11: Problem 1101 ~ Problem 1200
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | -------------------------------------------------------------- | :---: | :----: | :---: | :---: |
| 1111 | Medium | [Maximum Nesting Depth of Two Valid Parentheses Strings][1111] | :o: | :o: | :o: | |
| 1143 | Medium | [Longest Common Subsequence][1143] | :o: | | | |
| 1160 | Easy | [Find Words That Can Be Formed by Characters][1160] | :o: | :o: | | |
| 1162 | Medium | [As Far from Land as Possible][1162] | :o: | | | |
| 1200 | | | | | | |### Archive#12: Problem 1201 ~ Problem 1300
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | -------------------------------------- | :---: | :----: | :---: | :---: |
| 1232 | Easy | [Check If It Is a Straight Line][1232] | :o: | | | |
| 1248 | Medium | [Count Number of Nice Subarrays][1248] | :o: | | | |
| 1300 | | | | | | |### Archive#13: Problem 1301 ~ Problem 1400
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | ------- | :---: | :----: | :---: | :---: |
| 1400 | | | | | | |### Archive#14: Problem 1401 ~ Problem 1500
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ---- | ---------- | --------------------------------------------------------------------------------------- | :---: | :----: | :---: | :---: |
| 1415 | Medium | [The k-th Lexicographical String of All Happy Strings of Length n][1415] | :o: | | | |
| 1426 | Easy | [Counting Elements][1426] | :o: | :o: | :o: | |
| 1427 | Easy | [Perform String Shifts][1427] | :o: | :o: | :o: | |
| 1428 | Medium | [Leftmost Column with at Least a One][1428] | :o: | | | |
| 1429 | Medium | [First Unique Number][1429] | :o: | | | |
| 1430 | Medium | [Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree][1430] | :o: | | | |
| 1500 | | | | | | |### Locked LeetCode Problems (8)
* Solved
* 1426 - Counting Elements
* 1427 - Perform String Shifts
* 1428 - Leftmost Column with at Least a One
* 1429 - First Unique Number
* 1430 - Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
* Finded but without permission
* 288 - Unique Word Abbreviation
* 308 - Range Sum Query 2D - Mutable
* 444 - Sequence Reconstruction### Archive#CCI
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ------------ | ---------- | --------------------- | :---: | :----: | :---: | :---: |
| 面试题 01.06 | Easy | [字符串压缩][cci0106] | :o: | | | |
| 面试题 01.07 | Medium | [旋转矩阵][cci0107] | :o: | | | |
| 面试题 08.11 | Medium | [硬币][cci0811] | :o: | | | |
| 面试题 16.03 | Hard | [交点][cci1603] | :o: | | | |
| 面试题 17.16 | Easy | [按摩师][cci1716] | :o: | | | |### Archive#COF
| ID | Difficulty | Problem | cpp | python | ruby | java |
| ----------- | ---------- | ------------------------------ | :---: | :----: | :---: | :---: |
| 面试题 13 | Medium | [机器人的运动范围][cof13] | :o: | | | |
| 面试题 40 | Easy | [最小的 k 个数][cof40] | :o: | | | |
| 面试题 51 | Hard | [数组中的逆序对][cof51] | :o: | | | |
| 面试题 56-I | Medium | [数组中数字出现的次数][cof56a] | :o: | | | |
| 面试题 62 | Easy | [圆圈中最后剩下的数字][cof62] | :o: | | | |### Tags // 标签分类
#### Programming Fundamentals // 编程基础
* ![Array](materials/数组-Array-007ec6.svg) (37): [001][001], [004][004], [011][011], [015][015], [016][016], [031][031], [033][033], [039][039], [042][042], [045][045], [053][053], [055][055], [056][056], [064][064], [074][074], [081][081], [121][121], [122][122], [123][123], [126][126], [152][152], [169][169], [189][189], [238][238], [283][283], [289][289], [560][560], [695][695], [714][714], [945][945], [1013][1013], [1160][1160], [1232][1232], [1426][1426], [1427][1427], [1428][1428], [cci0107][cci0107]
* ![String](materials/字符串-String-007ec6.svg) (35): [003][003], [005][005], [006][006], [008][008], [010][010], [012][012], [013][013], [014][014], [017][017], [020][020], [022][022], [032][032], [044][044], [049][049], [065][065], [068][068], [072][072], [091][091], [093][093], [125][125], [126][126], [151][151], [165][165], [227][227], [273][273], [383][383], [385][385], [387][387], [415][415], [468][468], [541][541], [678][678], [1071][1071], [1415][1415], [cci0106][cci0106]
* ![Tree](materials/树-Tree-007ec6.svg) (12): [098][098], [104][104], [124][124], [199][199], [226][226], [235][235], [236][236], [543][543], [572][572], [993][993], [1008][1008], [1430][1430]
* ![Bit_Manipulation](materials/位运算-Bit_Manipulation-007ec6.svg) (8): [136][136], [137][137], [169][169], [201][201], [231][231], [260][260], [318][318], [476][476]#### Algorithm // 算法
* ![Backtracking](materials/回溯法-Backtracking-007ec6.svg) (11): [010][010], [017][017], [022][022], [039][039], [044][044], [046][046], [093][093], [126][126], [211][211], [306][306], [1415][1415]
* ![Binary_Search](materials/二分查找-Binary_Search-007ec6.svg) (16): [004][004], [029][029], [033][033], [050][050], [069][069], [074][074], [081][081], [278][278], [300][300], [315][315], [327][327], [367][367], [493][493], [887][887], [1095][1095], [1111][1111]
* ![Breadth--first_Search](materials/广度优先搜索-Breadth--first_Search-007ec6.svg) (11): [126][126], [127][127], [130][130], [133][133], [199][199], [200][200], [279][279], [542][542], [752][752], [993][993], [1162][1162]
* ![Depth--first_Search](materials/深度优先搜索-Depth--first_Search-007ec6.svg) (12): [098][098], [104][104], [124][124], [130][130], [133][133], [199][199], [200][200], [394][394], [494][494], [542][542], [695][695], [733][733]
* ![Divide_and_Conquer](materials/分治法-Divide_and_Conquer-007ec6.svg) (10): [004][004], [023][023], [053][053], [169][169], [218][218], [241][241], [315][315], [327][327], [493][493], [cof40][cof40]
* ![Dynamic_Programming](materials/动态规划-Dynamic_Programming-007ec6.svg) (27): [005][005], [010][010], [032][032], [044][044], [053][053], [064][064], [072][072], [091][091], [121][121], [123][123], [139][139], [152][152], [188][188], [221][221], [279][279], [300][300], [309][309], [464][464], [466][466], [494][494], [714][714], [887][887], [983][983], [1049][1049], [1143][1143], [cci0811][cci0811], [cci1716][cci1716]
* ![Greedy](materials/贪心-Greedy-007ec6.svg) (7): [044][044], [045][045], [055][055], [122][122], [714][714], [1046][1046], [1111][1111]
* ![Line_Sweep](materials/扫描线-Line_Sweep-007ec6.svg) (1): [218][218]
* ![Two_Pointers](materials/双指针法-Two_Pointers-007ec6.svg) (13): [003][003], [011][011], [015][015], [016][016], [019][019], [042][042], [061][061], [086][086], [125][125], [142][142], [283][283], [844][844], [1248][1248]
* ![Sliding_Window](materials/滑窗法-Sliding_Window-007ec6.svg) (1): [003][003]
* ![Sort](materials/排序-Sort-007ec6.svg) (5): [056][056], [220][220], [315][315], [327][327], [493][493]#### Data Structure // 数据结构
* ![Binary_Indexed_Tree](materials/树状数组-Binary_Indexed_Tree-007ec6.svg) (5): [218][218], [307][307], [315][315], [327][327], [493][493]
* ![Graph](materials/图-Graph-007ec6.svg) (3): [133][133], [997][997], [1162][1162]
* ![Hash_Table](materials/哈希表-Hash_Table-007ec6.svg) (17): [001][001], [003][003], [049][049], [136][136], [149][149], [166][166], [202][202], [204][204], [355][355], [387][387], [409][409], [525][525], [560][560], [739][739], [771][771], [1160][1160], [1429][1429]
* ![Heap](materials/堆-Heap-007ec6.svg) (5): [023][023], [218][218], [355][355], [1046][1046], [cof40][cof40]
* ![Linked_List](materials/链表-Linked_List-007ec6.svg) (15): [002][002], [019][019], [021][021], [023][023], [024][024], [025][025], [061][061], [082][082], [083][083], [086][086], [141][141], [142][142], [143][143], [445][445], [876][876]
* ![Ordered_Map](materials/保序映射-Ordered_Map-007ec6.svg) (1): [220][220]
* ![Queue](materials/队列-Queue-007ec6.svg) (1): [622][622]
* ![Segment_Tree](materials/线段树-Segment_Tree-007ec6.svg) (5): [218][218], [307][307], [315][315], [327][327], [493][493]
* ![Stack](materials/堆栈-Stack-007ec6.svg) (11): [020][020], [042][042], [150][150], [155][155], [224][224], [225][225], [385][385], [394][394], [735][735], [739][739], [844][844]
* ![Tire](materials/Tire树-Tire-007ec6.svg) (2): [208][208], [211][211]
* ![Union_Find](materials/并查集-Union_Find-007ec6.svg) (2): [130][130], [200][200]#### Math, Arithmetic, Game Theory // 数学相关
* ![Math](materials/数学-Math-007ec6.svg) (27): [002][002], [007][007], [008][008], [009][009], [012][012], [013][013], [029][029], [050][050], [065][065], [069][069], [149][149], [166][166], [202][202], [204][204], [224][224], [231][231], [273][273], [279][279], [365][365], [367][367], [836][836], [887][887], [892][892], [1009][1009], [1232][1232], [1427][1427], [cci1603][cci1603]
* ![Geometry](materials/几何-Geometry-007ec6.svg) (3): [892][892], [1232][1232], [cci1603][cci1603]
* ![Minimax](materials/极小极大算法-Minimax-007ec6.svg) (1): [464][464]#### High-level Programming Techniques // 编程技巧
* ![Design](materials/设计-Design-007ec6.svg) (8): [146][146], [155][155], [208][208], [211][211], [225][225], [355][355], [622][622], [1429][1429]
#### Un-taged (by LeetCode)
Several questions were not attaching any tags by the LeetCode. So I mark them with my tags (green colored) for looking them over. It may be a thinking way, a concept, a programming technique, or a data structure. // 部分题目并没有给出官方的标签,所以我自作主张给了一份绿色标签,包括思维方式、概念、编程技巧或特殊数据结构。
* ![Binary_Search2](materials/二分查找-Binary_Search-009688.svg) (1): [540][540]
* ![Bit_Manipulation2](materials/位运算-Bit_Manipulation-009688.svg) (2): [540][540], [cof56a][cof56a]
* ![HeapSort](materials/堆排序-HeapSort-009688.svg) (1): [912][912]
* ![Josephus](materials/约瑟夫环-Josephus-009688.svg) (1): [cof62][cof62]
* ![MergeSort](materials/归并排序-MergeSort-009688.svg) (1): [912][912], [cof51][cof51]
* ![QuickSort](materials/快速排序-QuickSort-009688.svg) (1): [912][912]
* ![Searching_Method](materials/搜索法-Searching_Method-009688.svg) (1): [cof13][cof13]
* ![ShellSort](materials/希尔排序-ShellSort-009688.svg) (1): [912][912]
* ![Simulation_Method](materials/模拟法-Simulation_Method-009688.svg) (1): [cof62][cof62]
* ![Structured_Approach](materials/构造法-Structured_Approach-009688.svg) (1): [420][420], [820][820]
* ![Tire2](materials/Tire树-Tire-009688.svg) (1): [820][820]## License
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
[001]: /Archive%2300-001-100/001-Two%20Sum
[002]: /Archive%2300-001-100/002-Add%20Two%20Numbers
[003]: /Archive%2300-001-100/003-Longest%20Substring%20Without%20Repeating%20Characters
[004]: /Archive%2300-001-100/004-Median%20of%20Two%20Sorted%20Arrays
[005]: /Archive%2300-001-100/005-Longest%20Palindromic%20Substring
[006]: /Archive%2300-001-100/006-ZigZag%20Conversion
[007]: /Archive%2300-001-100/007-Reverse%20Integer
[008]: /Archive%2300-001-100/008-String%20to%20Integer%20%28atoi%29
[009]: /Archive%2300-001-100/009-Palindrome%20Number
[010]: /Archive%2300-001-100/010-Regular%20Expression%20Matching
[011]: /Archive%2300-001-100/011-Container%20With%20Most%20Water
[012]: /Archive%2300-001-100/012-Integer%20to%20Roman
[013]: /Archive%2300-001-100/013-Roman%20to%20Integer
[014]: /Archive%2300-001-100/014-Longest%20Common%20Prefix
[015]: /Archive%2300-001-100/015-3Sum
[016]: /Archive%2300-001-100/016-3Sum%20Closest
[017]: /Archive%2300-001-100/017-Letter%20Combinations%20of%20a%20Phone%20Number
[019]: /Archive%2300-001-100/019-Remove%20Nth%20Node%20From%20End%20of%20List
[020]: /Archive%2300-001-100/020-Valid%20Parentheses
[021]: /Archive%2300-001-100/021-Merge%20Two%20Sorted%20Lists
[022]: /Archive%2300-001-100/022-Generate%20Parentheses
[023]: /Archive%2300-001-100/023-Merge%20k%20Sorted%20Lists
[024]: /Archive%2300-001-100/024-Swap%20Nodes%20in%20Pairs
[025]: /Archive%2300-001-100/025-Reverse%20Nodes%20in%20k-Group
[029]: /Archive%2300-001-100/029-Divide%20Two%20Integers
[031]: /Archive%2300-001-100/031-Next%20Permutation
[032]: /Archive%2300-001-100/032-Longest%20Valid%20Parentheses
[033]: /Archive%2300-001-100/033-Search%20in%20Rotated%20Sorted%20Array
[039]: /Archive%2300-001-100/039-Combination%20Sum
[042]: /Archive%2300-001-100/042-Trapping%20Rain%20Water
[044]: /Archive%2300-001-100/044-Wildcard%20Matching
[045]: /Archive%2300-001-100/045-Jump%20Game%20II
[046]: /Archive%2300-001-100/046-Permutations
[049]: /Archive%2300-001-100/049-Group%20Anagrams
[050]: /Archive%2300-001-100/050-Pow%28x,%20n%29
[053]: /Archive%2300-001-100/053-Maximum%20Subarray
[055]: /Archive%2300-001-100/055-Jump%20Game
[056]: /Archive%2300-001-100/056-Merge%20Intervals
[061]: /Archive%2300-001-100/061-Rotate%20List
[064]: /Archive%2300-001-100/064-Minimum%20Path%20Sum
[065]: /Archive%2300-001-100/065-Valid%20Number
[068]: /Archive%2300-001-100/068-Text%20Justification
[069]: /Archive%2300-001-100/069-Sqrt%28x%29
[072]: /Archive%2300-001-100/072-Edit%20Distance
[074]: /Archive%2300-001-100/074-Search%20a%202D%20Matrix
[081]: /Archive%2300-001-100/081-Search%20in%20Rotated%20Sorted%20Array%20II
[082]: /Archive%2300-001-100/082-Remove%20Duplicates%20from%20Sorted%20List%20II
[083]: /Archive%2300-001-100/083-Remove%20Duplicates%20from%20Sorted%20List
[086]: /Archive%2300-001-100/086-Partition%20List
[091]: /Archive%2300-001-100/091-Decode%20Ways
[093]: /Archive%2300-001-100/093-Restore%20IP%20Addresses
[098]: /Archive%2300-001-100/098-Validate%20Binary%20Search%20Tree[104]: /Archive%2301-101-200/104-Maximum%20Depth%20of%20Binary%20Tree
[121]: /Archive%2301-101-200/121-Best%20Time%20to%20Buy%20and%20Sell%20Stock
[122]: /Archive%2301-101-200/122-Best%20Time%20to%20Buy%20and%20Sell%20Stock%20II
[123]: /Archive%2301-101-200/123-Best%20Time%20to%20Buy%20and%20Sell%20Stock%20III
[124]: /Archive%2301-101-200/124-Binary%20Tree%20Maximum%20Path%20Sum
[125]: /Archive%2301-101-200/125-Valid%20Palindrome
[126]: /Archive%2301-101-200/126-Word%20Ladder%20II
[127]: /Archive%2301-101-200/127-Word%20Ladder
[130]: /Archive%2301-101-200/130-Surrounded%20Regions
[133]: /Archive%2301-101-200/133-Clone%20Graph
[136]: /Archive%2301-101-200/136-Single%20Number
[137]: /Archive%2301-101-200/137-Single%20Number%20II
[139]: /Archive%2301-101-200/139-Word%20Break
[141]: /Archive%2301-101-200/141-Linked%20List%20Cycle
[142]: /Archive%2301-101-200/142-Linked%20List%20Cycle%20II
[143]: /Archive%2301-101-200/143-Reorder%20List
[146]: /Archive%2301-101-200/146-LRU%20Cache
[149]: /Archive%2301-101-200/149-Max%20Points%20on%20a%20Line
[150]: /Archive%2301-101-200/150-Evaluate%20Reverse%20Polish%20Notation
[151]: /Archive%2301-101-200/151-Reverse%20Words%20in%20a%20String
[152]: /Archive%2301-101-200/152-Maximum%20Product%20Subarray
[155]: /Archive%2301-101-200/155-Min%20Stack
[165]: /Archive%2301-101-200/165-Compare%20Version%20Numbers
[166]: /Archive%2301-101-200/166-Fraction%20to%20Recurring%20Decimal
[169]: /Archive%2301-101-200/169-Majority%20Element
[188]: /Archive%2301-101-200/188-Best%20Time%20to%20Buy%20and%20Sell%20Stock%20IV
[189]: /Archive%2301-101-200/189-Rotate%20Array
[199]: /Archive%2301-101-200/199-Binary%20Tree%20Right%20Side%20View
[200]: /Archive%2301-101-200/200-Number%20of%20Islands[201]: /Archive%2302-201-300/201-Bitwise%20AND%20of%20Numbers%20Range
[202]: /Archive%2302-201-300/202-Happy%20Number
[204]: /Archive%2302-201-300/204-Count%20Primes
[208]: /Archive%2302-201-300/208-Implement%20Trie%20%28Prefix%20Tree%29
[211]: /Archive%2302-201-300/211-Add%20and%20Search%20Word%20-%20Data%20structure%20design
[218]: /Archive%2302-201-300/218-The%20Skyline%20Problem
[220]: /Archive%2302-201-300/220-Contains%20Duplicate%20III
[221]: /Archive%2302-201-300/221-Maximal%20Square
[224]: /Archive%2302-201-300/224-Basic%20Calculator
[225]: /Archive%2302-201-300/225-Implement%20Stack%20using%20Queues
[226]: /Archive%2302-201-300/226-Invert%20Binary%20Tree
[227]: /Archive%2302-201-300/227-Basic%20Calculator%20II
[231]: /Archive%2302-201-300/231-Power%20of%20Two
[235]: /Archive%2302-201-300/235-Lowest%20Common%20Ancestor%20of%20a%20Binary%20Search%20Tree
[236]: /Archive%2302-201-300/236-Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree
[238]: /Archive%2302-201-300/238-Product%20of%20Array%20Except%20Self
[241]: /Archive%2302-201-300/241-Different%20Ways%20to%20Add%20Parentheses
[260]: /Archive%2302-201-300/260-Single%20Number%20III
[273]: /Archive%2302-201-300/273-Integer%20to%20English%20Words
[278]: /Archive%2302-201-300/278-First%20Bad%20Version
[279]: /Archive%2302-201-300/279-Perfect%20Squares
[283]: /Archive%2302-201-300/283-Move%20Zeroes
[289]: /Archive%2302-201-300/289-Game%20of%20Life
[300]: /Archive%2302-201-300/300-Longest%20Increasing%20Subsequence[306]: /Archive%2303-301-400/306-Additive%20Number
[307]: /Archive%2303-301-400/307-Range%20Sum%20Query%20-%20Mutable
[309]: /Archive%2303-301-400/309-Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Cooldown
[315]: /Archive%2303-301-400/315-Count%20of%20Smaller%20Numbers%20After%20Self
[318]: /Archive%2303-301-400/318-Maximum%20Product%20of%20Word%20Lengths
[327]: /Archive%2303-301-400/327-Count%20of%20Range%20Sum
[355]: /Archive%2303-301-400/355-Design%20Twitter
[365]: /Archive%2303-301-400/365-Water%20and%20Jug%20Problem
[367]: /Archive%2303-301-400/367-Valid%20Perfect%20Square
[383]: /Archive%2303-301-400/383-Ransom%20Note
[385]: /Archive%2303-301-400/385-Mini%20Parser
[387]: /Archive%2303-301-400/387-First%20Unique%20Character%20in%20a%20String
[394]: /Archive%2303-301-400/394-Decode%20String[409]: /Archive%2304-401-500/409-Longest%20Palindrome
[415]: /Archive%2304-401-500/415-Add%20Strings
[420]: /Archive%2304-401-500/420-Strong%20Password%20Checker
[445]: /Archive%2304-401-500/445-Add%20Two%20Numbers%20II
[464]: /Archive%2304-401-500/464-Can%20I%20Win
[466]: /Archive%2304-401-500/466-Count%20The%20Repetitions
[468]: /Archive%2304-401-500/468-Validate%20IP%20Address
[476]: /Archive%2304-401-500/476-Number%20Complement
[493]: /Archive%2304-401-500/493-Reverse%20Pairs
[494]: /Archive%2304-401-500/494-Target%20Sum[525]: /Archive%2305-501-600/525-Contiguous%20Array
[540]: /Archive%2305-501-600/540-Single%20Element%20in%20a%20Sorted%20Array
[541]: /Archive%2305-501-600/541-Reverse%20String%20II
[542]: /Archive%2305-501-600/542-01%20Matrix
[543]: /Archive%2305-501-600/543-Diameter%20of%20Binary%20Tree
[560]: /Archive%2305-501-600/560-Subarray%20Sum%20Equals%20K
[572]: /Archive%2305-501-600/572-Subtree%20of%20Another%20Tree[622]: /Archive%2306-601-700/622-Design%20Circular%20Queue
[678]: /Archive%2306-601-700/678-Valid%20Parenthesis%20String
[695]: /Archive%2306-601-700/695-Max%20Area%20of%20Island[714]: /Archive%2307-701-800/714-Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Transaction%20Fee
[733]: /Archive%2307-701-800/733-Flood%20Fill
[735]: /Archive%2307-701-800/735-Asteroid%20Collision
[739]: /Archive%2307-701-800/739-Daily%20Temperatures
[752]: /Archive%2307-701-800/752-Open%20the%20Lock
[771]: /Archive%2307-701-800/771-Jewels%20and%20Stones[820]: /Archive%2308-801-900/820-Short%20Encoding%20of%20Words
[836]: /Archive%2308-801-900/836-Rectangle%20Overlap
[844]: /Archive%2308-801-900/844-Backspace%20String%20Compare
[876]: /Archive%2308-801-900/876-Middle%20of%20the%20Linked%20List
[887]: /Archive%2308-801-900/887-Super%20Egg%20Drop
[892]: /Archive%2308-801-900/892-Surface%20Area%20of%203D%20Shapes[912]: /Archive%2309-901-1000/912-Sort%20an%20Array
[945]: /Archive%2309-901-1000/945-Minimum%20Increment%20to%20Make%20Array%20Unique
[983]: /Archive%2309-901-1000/983-Minimum%20Cost%20For%20Tickets
[993]: /Archive%2309-901-1000/993-Cousins%20in%20Binary%20Tree
[997]: /Archive%2309-901-1000/997-Find%20the%20Town%20Judge[1008]: /Archive%2310-1001-1100/1008-Construct%20Binary%20Search%20Tree%20from%20Preorder%20Traversal
[1009]: /Archive%2310-1001-1100/1009-Complement%20of%20Base%2010%20Integer
[1013]: /Archive%2310-1001-1100/1013-Partition%20Array%20Into%20Three%20Parts%20With%20Equal%20Sum
[1046]: /Archive%2310-1001-1100/1046-Last%20Stone%20Weight
[1049]: /Archive%2310-1001-1100/1049-Last%20Stone%20Weight%20II
[1071]: /Archive%2310-1001-1100/1071-Greatest%20Common%20Divisor%20of%20Strings
[1095]: /Archive%2310-1001-1100/1095-Find%20in%20Mountain%20Array[1111]: /Archive%2311-1101-1200/1111-Maximum%20Nesting%20Depth%20of%20Two%20Valid%20Parentheses%20Strings
[1143]: /Archive%2311-1101-1200/1143-Longest%20Common%20Subsequence
[1160]: /Archive%2311-1101-1200/1160-Find%20Words%20That%20Can%20Be%20Formed%20by%20Characters
[1162]: /Archive%2311-1101-1200/1162-As%20Far%20from%20Land%20as%20Possible[1232]: /Archive%2312-1201-1300/1232-Check%20If%20It%20Is%20a%20Straight%20Line
[1248]: /Archive%2312-1201-1300/1248-Count%20Number%20of%20Nice%20Subarrays[1415]: /Archive%2314-1401-1500/1415-The%20k-th%20Lexicographical%20String%20of%20All%20Happy%20Strings%20of%20Length%20n
[1426]: /Archive%2314-1401-1500/1426-Counting%20Elements
[1427]: /Archive%2314-1401-1500/1427-Perform%20String%20Shifts
[1428]: /Archive%2314-1401-1500/1428-Leftmost%20Column%20with%20at%20Least%20a%20One
[1429]: /Archive%2314-1401-1500/1429-First%20Unique%20Number
[1430]: /Archive%2314-1401-1500/1430-Check%20If%20a%20String%20Is%20a%20Valid%20Sequence%20from%20Root%20to%20Leaves%20Path%20in%20a%20Binary%20Tree[cci0106]: /Archive%23CCI/0106-字符串压缩
[cci0107]: /Archive%23CCI/0107-旋转矩阵
[cci0811]: /Archive%23CCI/0811-硬币
[cci1603]: /Archive%23CCI/1603-交点
[cci1716]: /Archive%23CCI/1716-按摩师[cof13]: /Archive%23COF/13-机器人的运动范围
[cof40]: /Archive%23COF/40-最小的k个数
[cof51]: /Archive%23COF/51-数组中的逆序对
[cof56a]: /Archive%23COF/56a-数组中数字出现的次数
[cof62]: /Archive%23COF/62-圆圈中最后剩下的数字