|
3 | 3 | 
|
4 | 4 | [](./LICENSE.md)
|
5 | 5 | 
|
6 |
| - |
| 6 | + |
7 | 7 | [](https://saythanks.io/to/kamyu104)
|
8 | 8 | <br>
|
9 | 9 | 
|
|
235 | 235 | 1252 | [Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/) | [C++](./C++/cells-with-odd-values-in-a-matrix.cpp) [Python](./Python/cells-with-odd-values-in-a-matrix.py) | _O(n + m)_ | _O(n + m)_ | Easy ||
|
236 | 236 | 1260 | [Shift 2D Grid](https://leetcode.com/problems/shift-2d-grid/) | [C++](./C++/shift-2d-grid.cpp) [Python](./Python/shift-2d-grid.py) | _O(n)_ | _O(1)_ | Easy ||
|
237 | 237 | 1267 | [Count Servers that Communicate](https://leetcode.com/problems/count-servers-that-communicate/) | [C++](./C++/count-servers-that-communicate.cpp) [Python](./Python/count-servers-that-communicate.py) | _O(m * n)_ | _O(m + n)_ | Medium ||
|
| 238 | +1275 | [Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/) | [C++](./C++/find-winner-on-a-tic-tac-toe-game.cpp) [Python](./Python/find-winner-on-a-tic-tac-toe-game.py) | _O(1)_ | _O(1)_ | Easy || |
238 | 239 |
|
239 | 240 | ## String
|
240 | 241 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
339 | 340 | 1189 | [Maximum Number of Balloons](https://leetcode.com/problems/maximum-number-of-balloons/) | [C++](./C++/maximum-number-of-balloons.cpp) [Python](./Python/maximum-number-of-balloons.py) | _O(n)_ | _O(1)_ | Easy | | Hash
|
340 | 341 | 1233 | [Remove Sub-Folders from the Filesystem](https://leetcode.com/problems/remove-sub-folders-from-the-filesystem/) | [C++](./C++/remove-sub-folders-from-the-filesystem.cpp) [Python](./Python/remove-sub-folders-from-the-filesystem.py) | _O(n)_ | _O(t)_ | Medium | | Trie
|
341 | 342 | 1234 | [Replace the Substring for Balanced String](https://leetcode.com/problems/replace-the-substring-for-balanced-string/) | [C++](./C++/replace-the-substring-for-balanced-string.cpp) [Python](./Python/replace-the-substring-for-balanced-string.py) | _O(n)_ | _O(t)_ | Medium | | Two Pointers, Sliding Window
|
| 343 | +1271 | [Hexspeak](https://leetcode.com/problems/hexspeak/) | [C++](./C++/hexspeak.cpp) [Python](./Python/hexspeak.py) | _O(n)_ | _O(1)_ | Easy | | |
342 | 344 |
|
343 | 345 | ## Linked List
|
344 | 346 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
712 | 714 | 1256| [Encode Number](https://leetcode.com/problems/encode-number/) | [C++](./C++/encode-number.cpp) [Python](./Python/encode-number.py) | _O(logn)_ | _O(1)_ | Medium | |
|
713 | 715 | 1259| [Handshakes That Don't Cross](https://leetcode.com/problems/handshakes-that-dont-cross/) | [C++](./C++/handshakes-that-dont-cross.cpp) [Python](./Python/handshakes-that-dont-cross.py) | _O(n)_ | _O(1)_ | Hard | | `Catalan Number`, DP
|
714 | 716 | 1266| [Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points/) | [C++](./C++/minimum-time-visiting-all-points.cpp) [Python](./Python/minimum-time-visiting-all-points.py) | _O(n)_ | _O(1)_ | Easy | |
|
| 717 | +1276| [Number of Burgers with No Waste of Ingredients](https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients/) | [C++](./C++/number-of-burgers-with-no-waste-of-ingredients.cpp) [Python](./Python/number-of-burgers-with-no-waste-of-ingredients.py) | _O(1)_ | _O(1)_ | Medium | | |
715 | 718 |
|
716 | 719 | ## Sort
|
717 | 720 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
864 | 867 | 1201 | [Ugly Number III](https://leetcode.com/problems/ugly-number-iii/) | [C++](./C++/ugly-number-iii.cpp) [Python](./Python/ugly-number-iii.py) | _O(logn)_ | _O(1)_ | Medium | | Inclusion-Exclusion Principle
|
865 | 868 | 1228 | [Missing Number In Arithmetic Progression](https://leetcode.com/problems/missing-number-in-arithmetic-progression/) | [C++](./C++/missing-number-in-arithmetic-progression.cpp) [Python](./Python/missing-number-in-arithmetic-progression.py) | _O(logn)_ | _O(1)_ | Easy | |
|
866 | 869 | 1231 | [Divide Chocolate](https://leetcode.com/problems/divide-chocolate/) | [C++](./C++/divide-chocolate.cpp) [Python](./Python/divide-chocolate.py) | _O(nlogn)_ | _O(1)_ | Hard | |
|
| 870 | +1274 | [Number of Ships in a Rectangle](https://leetcode.com/problems/number-of-ships-in-a-rectangle/) | [C++](./C++/number-of-ships-in-a-rectangle.cpp) [Python](./Python/number-of-ships-in-a-rectangle.py) | _O(log(m * n))_ | _O(log(m * n))_ | Hard | | Divide and Conquer |
867 | 871 |
|
868 | 872 | ## Binary Search Tree
|
869 | 873 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
981 | 985 | 1192| [Critical Connections in a Network](https://leetcode.com/problems/critical-connections-in-a-network/) | [C++](./C++/critical-connections-in-a-network.cpp) [Python](./Python/critical-connections-in-a-network.py) | _O(\|V\| + \|E\|)_ | _O(\|V\| + \|E\|)_ | Hard || `Tarjan's Algorithm`, `Bridge Finding Algorithm` |
|
982 | 986 | 1202| [Smallest String With Swaps](https://leetcode.com/problems/smallest-string-with-swaps/) | [C++](./C++/smallest-string-with-swaps.cpp) [Python](./Python/smallest-string-with-swaps.py) | _O(nlogn)_ | _O(n)_ | Medium || Union Find |
|
983 | 987 | 1254| [Number of Closed Islands](https://leetcode.com/problems/number-of-closed-islands/) | [C++](./C++/number-of-closed-islands.cpp) [Python](./Python/number-of-closed-islands.py) | _O(m * n)_ | _O(1)_ | Medium |||
|
| 988 | +1273| [Delete Tree Nodes](https://leetcode.com/problems/delete-tree-nodes/) | [C++](./C++/delete-tree-nodes.cpp) [Python](./Python/delete-tree-nodes.py) | _O(n)_ | _O(n)_ | Medium || DFS, DP | |
984 | 989 |
|
985 | 990 | ## Backtracking
|
986 | 991 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
1161 | 1166 | 1246 | [Palindrome Removal](https://leetcode.com/problems/palindrome-removal/) | [C++](./C++/palindrome-removal.cpp) [Python](./Python/palindrome-removal.py) | _O(n^3)_ | _O(n^2)_ | Hard | | |
|
1162 | 1167 | 1262 | [Greatest Sum Divisible by Three](https://leetcode.com/problems/greatest-sum-divisible-by-three/) | [C++](./C++/greatest-sum-divisible-by-three.cpp) [Python](./Python/greatest-sum-divisible-by-three.py) | _O(n)_ | _O(1)_ | Medium | | |
|
1163 | 1168 | 1269 | [Number of Ways to Stay in the Same Place After Some Steps](https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/) | [C++](./C++/number-of-ways-to-stay-in-the-same-place-after-some-steps.cpp) [Python](./Python/number-of-ways-to-stay-in-the-same-place-after-some-steps.py) | _O(n^2)_ | _O(n)_ | Hard | | |
|
| 1169 | +1277 | [Count Square Submatrices with All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones/) | [C++](./C++/count-square-submatrices-with-all-ones.cpp) [Python](./Python/count-square-submatrices-with-all-ones.py) | _O(m * n)_ | _O(1)_ | Medium | | | |
| 1170 | +1278 | [Palindrome Partitioning III](https://leetcode.com/problems/palindrome-partitioning-iii/) | [C++](./C++/palindrome-partitioning-iii.cpp) [Python](./Python/palindrome-partitioning-iii.py) | _O(k * n^2)_ | _O(n^2)_ | Hard | | | |
1164 | 1171 |
|
1165 | 1172 | ## Greedy
|
1166 | 1173 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
1221 | 1228 | 1247 | [Minimum Swaps to Make Strings Equal](https://leetcode.com/problems/minimum-swaps-to-make-strings-equal/) | [C++](./C++/minimum-swaps-to-make-strings-equal.cpp) [Python](./Python/minimum-swaps-to-make-strings-equal.py) | _O(n)_ | _O(1)_ | Easy ||
|
1222 | 1229 | 1249 | [Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/) | [C++](./C++/minimum-remove-to-make-valid-parentheses.cpp) [Python](./Python/minimum-remove-to-make-valid-parentheses.py) | _O(n)_ | _O(1)_ | Medium | | Stack
|
1223 | 1230 | 1253 | [Reconstruct a 2-Row Binary Matrix](https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix/) | [C++](./C++/reconstruct-a-2-row-binary-matrix.cpp) [Python](./Python/reconstruct-a-2-row-binary-matrix.py) | _O(n)_ | _O(1)_ | Medium ||
|
| 1231 | +1272 | [Remove Interval](https://leetcode.com/problems/remove-interval/) | [C++](./C++/remove-interval.cpp) [Python](./Python/remove-interval.py) | _O(n)_ | _O(1)_ | Medium || Line Sweep |
1224 | 1232 |
|
1225 | 1233 | ## Graph
|
1226 | 1234 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
1353 | 1361 | 1241| [Number of Comments per Post](https://leetcode.com/problems/number-of-comments-per-post/) | [MySQL](./MySQL/number-of-comments-per-post.sql) | _O(n)_ | _O(n)_ | Easy |🔒| |
|
1354 | 1362 | 1251| [Average Selling Price](https://leetcode.com/problems/average-selling-price/) | [MySQL](./MySQL/average-selling-price.sql) | _O(n)_ | _O(n)_ | Easy |🔒| |
|
1355 | 1363 | 1264| [Page Recommendations](https://leetcode.com/problems/page-recommendations/) | [MySQL](./MySQL/page-recommendations.sql) | _O(m + n)_ | _O(m)_ | Medium |🔒| |
|
| 1364 | +1270| [All People Report to the Given Manager](https://leetcode.com/problems/all-people-report-to-the-given-manager/) | [MySQL](./MySQL/all-people-report-to-the-given-manager.sql) | _O(n)_ | _O(n)_ | Medium |🔒| | |
1356 | 1365 |
|
1357 | 1366 | ## Shell Script
|
1358 | 1367 | | # | Title | Solution | Time | Space | Difficulty | Tag | Note|
|
|
0 commit comments