# Leetcode **Repository Path**: cuge1995/Leetcode ## Basic Information - **Project Name**: Leetcode - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-26 - **Last Updated**: 2021-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![Language](https://img.shields.io/badge/Language-Python-orange.svg?logo=Python&logoColor=yellow) ![Update](https://img.shields.io/badge/Update-Weekly-green.svg) ![Progress](https://img.shields.io/badge/progress-N%2F1049-brightgreen.svg) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Sponsors](https://img.shields.io/badge/Sponsor-0-lightgrey.svg) # Python solution for Leetcode Python solution of problems from [LeetCode](https://leetcode.com/). ##### [Extra Algorithms](./Extra/) | # | Title | Solution | |---| ----- | -------- | |1|Suffix Array|[Python](./Extra/suffix_array.py)| |2|Longest Common Prefix|[Python](./Extra/lcp.py)| ### LeetCode Algorithm ##### [Problems 1100-1200](./1200-1300q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |1296|[Divide Array in Sets of K Consecutive Numbers](https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers/)|[Python](./1200-1300q/1296.py)|Medium| |1295|[Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)|[Python](./1200-1300q/1295.py)|Easy| |1291|[Sequential Digits](https://leetcode.com/problems/sequential-digits/)|[Python](./1200-1300q/1291.py)|Medium| |1290|[Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/)|[Python](./1200-1300q/1290.py)|Easy| |1283|[Find the Smallest Divisor Given a Threshold](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold/)|[Python](./1200-1300q/1283.py)|Medium| |1282|[Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to/)|[Python](./1200-1300q/1282.py)|Medium| |1281|[Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/)|[Python](./1200-1300q/1281.py)|Easy| |1277|[Count Square Submatrices with All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones/)|[Python](./1200-1300q/1277.py)|Medium| |1276|[Number of Burgers with No Waste of Ingredients](https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients/)|[Python](./1200-1300q/1276.py)|Medium| |1275|[Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/)|[Python](./1200-1300q/1275.py)|Easy| |1268|[Search Suggestions System](https://leetcode.com/problems/search-suggestions-system/)|[Python](./1200-1300q/1268.py)|Medium| |1267|[Count Servers that Communicate](https://leetcode.com/problems/count-servers-that-communicate/)|[Python](./1200-1300q/1267.py)|Medium| |1266|[Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points/)|[Python](./1200-1300q/1266.py)|Easy| |1200|[Minimum Absolute Difference](https://leetcode.com/problems/minimum-absolute-difference/)|[Python](./1200-1300q/1200.py)|Easy| ##### [Problems 1100-1200](./1100-1200q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |1191|[K-Concatenation Maximum Sum](https://leetcode.com/problems/k-concatenation-maximum-sum/)|[Python](./1100-1200q/1191.py)|Medium| |1190|[Reverse Substrings Between Each Pair of Parentheses](https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/)|[Python](./1100-1200q/1190.py)|Medium| |1189|[ Maximum Number of Balloons](https://leetcode.com/problems/maximum-number-of-balloons/)|[Python](./1100-1200q/1189.py)|Easy| |1186|[Maximum Subarray Sum with One Deletion](https://leetcode.com/problems/maximum-subarray-sum-with-one-deletion/)|[Python](./1100-1200q/1186.py)|Medium| |1185|[Day of the Week](https://leetcode.com/problems/day-of-the-week/)|[Python](./1100-1200q/1185.py)|Easy| |1184|[Distance Between Bus Stops](https://leetcode.com/problems/distance-between-bus-stops/)|[Python](./1100-1200q/1184.py)|Easy| ##### [Problems 1000-1100](./1000-1100q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |1092|[Shortest Common Supersequence](https://leetcode.com/problems/shortest-common-supersequence)|[Python](./1000-1100q/1092.py)|Hard| |1091|[Shortest Path in Binary Matrix](https://leetcode.com/problems/shortest-path-in-binary-matrix)|[Python](./1000-1100q/1091.py)|Medium| |1090|[Largest Values From Labels ](https://leetcode.com/problems/largest-values-from-labels)|[Python](./1000-1100q/1090.py)|Medium| |1089|[Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros)|[Python](./1000-1100q/1089.py)|Easy| |1088|[Confusing Number II](https://leetcode.com/problems/confusing-number-ii)|[Python](./1000-1100q/1088.py)|Hard| |1087|[Brace Expansion](https://leetcode.com/problems/brace-expansion)|[Python](./1000-1100q/1087.py)|Medium| |1086|[High Five](https://leetcode.com/problems/high-five)|[Python](./1000-1100q/1086.py)|Medium| |1085|[Sum of Digits in the Minimum Number](https://leetcode.com/problems/sum-of-digits-in-the-minimum-number)|[Python](./1000-1100q/1085.py)|Medium| |1081|[Smallest Subsequence of Distinct Characters](https://leetcode.com/problems/smallest-subsequence-of-distinct-characters)|[Python](./1000-1100q/1081.py)|Medium| |1080|[Insufficient Nodes in Root to Leaf Paths](https://leetcode.com/problems/insufficient-nodes-in-root-to-leaf-paths)|[Python](./1000-1100q/1080.py)|Medium| |1079|[Letter Tile Possibilities](https://leetcode.com/problems/letter-tile-possibilities)|[Python](./1000-1100q/1079.py)|Medium| |1078|[Occurrences After Bigram](https://leetcode.com/problems/occurrences-after-bigram)|[Python](./1000-1100q/1078.py)|Easy| |1074|[Number of Submatrices That Sum to Target](https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/)|[Python](./1000-1100q/1074.py)|Hard| |1073|[Adding Two Negabinary Numbers](https://leetcode.com/problems/adding-two-negabinary-numbers)|[Python](./1000-1100q/1073.py)|Medium| |1072|[Flip Columns For Maximum Number of Equal Rows](https://leetcode.com/problems/flip-columns-for-maximum-number-of-equal-rows)|[Python](./1000-1100q/1072.py)|Medium| |1071|[Greatest Common Divisor of Strings](https://leetcode.com/problems/greatest-common-divisor-of-strings)|[Python](./1000-1100q/1071.py)|Easy| |1065|[Index Pairs of a String](https://leetcode.com/problems/index-pairs-of-a-string)|[Python](./1000-1100q/1065.py)|Easy| |1064|[Fixed Point](https://leetcode.com/problems/fixed-point)|[Python](./1000-1100q/1064.py)|Easy| |1054|[Distant Barcodes](https://leetcode.com/problems/distant-barcodes)|[Python](./1000-1100q/1054.py)|Medium| |1053|[Previous Permutation With One Swap](https://leetcode.com/problems/previous-permutation-with-one-swap)|[Python](./1000-1100q/1053.py)|Medium| |1052|[Grumpy Bookstore Owner](https://leetcode.com/problems/grumpy-bookstore-owner)|[Python](./1000-1100q/1052.py)|Medium| |1051|[Height Checker](https://leetcode.com/problems/height-checker)|[Python](./1000-1100q/1051.py)|Easy| |1048|[Longest String Chain](https://leetcode.com/problems/longest-string-chain)|[Python](./1000-1100q/1048.py)|Medium| |1047|[Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string)|[Python](./1000-1100q/1047.py)|Easy| |1046|[Last Stone Weight](https://leetcode.com/problems/last-stone-weight)|[Python](./1000-1100q/1046.py)|Easy| |1044|[Longest Duplicate Substring](https://leetcode.com/problems/longest-duplicate-substring)|[Python](./1000-1100q/1044.py)|Hard| |1043|[Partition Array for Maximum Sum](https://leetcode.com/problems/partition-array-for-maximum-sum/)|[Python](./1000-1100q/1043.py)|Medium| |1042|[Flower Planting With No Adjacent](https://leetcode.com/problems/flower-planting-with-no-adjacent)|[Python](./1000-1100q/1042.py)|Easy| |1041|[Robot Bounded In Circle](https://leetcode.com/problems/robot-bounded-in-circle)|[Python](./1000-1100q/1041.py)|Easy| |1039|[Minimum Score Triangulation of Polygon](https://leetcode.com/problems/minimum-score-triangulation-of-polygon)|[Python](./1000-1100q/1039.py)|Medium| |1038|[Binary Search Tree to Greater Sum Tree](https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree/)|[Python](./1000-1100q/1038.py)|Medium| |1037|[Valid Boomerang](https://leetcode.com/problems/valid-boomerang/)|[Python](./1000-1100q/1037.py)|Easy| |1035|[Uncrossed Lines](https://leetcode.com/problems/uncrossed-lines/)|[Python](./1000-1100q/1035.py)|Medium| |1034|[Coloring A Border](https://leetcode.com/problems/coloring-a-border/)|[Python](./1000-1100q/1034.py)|Medium| |1033|[Moving Stones Until Consecutive](https://leetcode.com/problems/moving-stones-until-consecutive)|[Python](./1000-1100q/1033.py)|Easy |1032|[Stream of Characters](https://leetcode.com/problems/stream-of-characters)|[Python](./1000-1100q/1032.py)|Hard| |1031|[Maximum Sum of Two Non-Overlapping Subarrays](https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays)|[Python](./1000-1100q/1031.py)|Medium| |1030|[Matrix Cells in Distance Order](https://leetcode.com/problems/matrix-cells-in-distance-order)|[Python](./1000-1100/1030.py)|Easy| |1029|[Two City Scheduling](https://leetcode.com/problems/two-city-scheduling)|[Python](./1000-1100q/1029.py)|Easy| |1028|[Recover a Tree From Preorder Traversal](https://leetcode.com/problems/recover-a-tree-from-preorder-traversal)|[Python](./1000-1100q/1028.py)|Hard| |1027|[Longest Arithmetic Sequence](https://leetcode.com/problems/longest-arithmetic-sequence)|[Python](./1000-1100q/1027.py)|Medium| |1026|[Maximum Difference Between Node and Ancestor](https://leetcode.com/problems/maximum-difference-between-node-and-ancestor)|[Python](./1000-1100q/1026.py)|Medium| |1025|[Divisor Game](https://leetcode.com/problems/divisor-game/)|[Python](./1000-1100q/1025.py)|Easy| |1023|[Camelcase Matching](https://leetcode.com/problems/camelcase-matching)|[Python](./1000-1100q/1023.py)|Medium| |1022|[Sum of Root To Leaf Binary Numbers](https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers)|[Python](./1000-1100q/1022.py)|Easy| |1021|[Remove Outermost Parentheses](https://leetcode.com/problems/remove-outermost-parentheses)|[Python](./1000-1100q/1021.py)|Easy| |1020|[Number of Enclaves](https://leetcode.com/problems/number-of-enclaves)|[Python](./1000-1100q/1020.py)|Medium| |1019|[Next Greater Node In Linked List](https://leetcode.com/problems/next-greater-node-in-linked-list)|[Python](./1000-1100q/1019.py)|Medium| |1018|[Binary Prefix Divisible By 5](https://leetcode.com/problems/binary-prefix-divisible-by-5)|[Python](./1000-1100q/1018.py)|Easy| |1017|[Convert to Base -2](https://leetcode.com/problems/convert-to-base-2)|[Python](./1000-1100q/1017.py)|Medium| |1016|[Binary String With Substrings Representing 1 To N](https://leetcode.com/problems/binary-string-with-substrings-representing-1-to-n)|[Python](./1000-1100q/1016.py)|Medium| |1015|[Smallest Integer Divisible by K](https://leetcode.com/problems/smallest-integer-divisible-by-k)|[Python](./1000-1100q/1015.py)|Medium| |1014|[Best Sightseeing Pair](https://leetcode.com/problems/best-sightseeing-pair)|[Python](./1000-1100q/1014.py)|Medium| |1013|[Partition Array Into Three Parts With Equal Sum ](https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum) | [Python](./1000-1100q/1013.py)|Easy| |1011|[Capacity To Ship Packages Within D Days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/) | [Python](./1000-1100q/1011.py) | Medium| |1010|[Pairs of Songs With Total Durations Divisible by 60](https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60/)|[Python](./1000-1100q/1010.py)|Easy| |1009|[Complement of Base 10 Integer](https://leetcode.com/problems/complement-of-base-10-integer/) | [Python](./1000-1100q/1009.py)|Easy| |1008|[Construct Binary Search Tree from Preorder Traversal](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal)|[Python](./1000-1100q/1008.py)|Medium| |1007|[Minimum Domino Rotations For Equal Row](https://leetcode.com/problems/minimum-domino-rotations-for-equal-row)|[Python](./1000-1100q/1007.py)|Medium| |1006|[Clumsy Factorial](https://leetcode.com/problems/clumsy-factorial)|[Python](./1000-1100q/1006.py)|Medium| |1005|[Maximize Sum Of Array After K Negations](https://leetcode.com/problems/maximize-sum-of-array-after-k-negations)|[Python](./1000-1100q/1005.py)|Easy| |1004|[Max Consecutive Ones III](https://leetcode.com/problems/max-consecutive-ones-iii)|[Python](./1000-1100q/1004.py)|Medium| |1003|[Check If Word Is Valid After Substitutions](https://leetcode.com/problems/check-if-word-is-valid-after-substitutions)|[Python](./1000-1100q/1003.py)|Medium| |1002|[Find Common Characters](https://leetcode.com/problems/find-common-characters)|[Python](./1000-1100q/1002.py)|Easy| ##### [Problems 900-1000](./900-1000q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |999|[Available Captures for Rook](https://leetcode.com/problems/available-captures-for-rook/)|[Python](./900-1000q/999.py)|Medium| |998|[Maximum Binary Tree II](https://leetcode.com/problems/maximum-binary-tree-ii) | [Python](./900-1000q/998.py) | Easy| |997|[Find the Town Judge](https://leetcode.com/problems/find-the-town-judge/) | [Python](./900-1000q/997.py) | Easy| |995|[Minimum Number of K Consecutive Bit Flips](https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/) | [Python](./900-1000q/995.py) | Hard| |994|[Rotting Oranges](https://leetcode.com/problems/rotting-oranges/) | [Python](./900-1000q/994.py)|Easy| |993|[Cousins in Binary Tree](https://leetcode.com/problems/cousins-in-binary-tree/) | [Python](./900-1000q/993.py)|Easy| |991|[Broken Calculator](https://leetcode.com/problems/broken-calculator/) | [Python](./900-1000q/991.py)|Medium| |990|[Satisfiability of Equality Equations](https://leetcode.com/problems/satisfiability-of-equality-equations/) | [Python](./900-1000q/990.py)|Medium| |989|[Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/)|[Python](./900-1000q/989.py)|Easy| |988|[Smallest String Starting From Leaf](https://leetcode.com/problems/smallest-string-starting-from-leaf/) | [Python](./900-1000q/988.py)|Medium| |985|[Sum of Even Numbers After Queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries/) | [Python](./900-1000q/985.py)|Easy| |984|[String Without AAA or BBB](https://leetcode.com/problems/string-without-aaa-or-bbb/) | [Python](./900-1000q/984.py)|Easy| |983|[Minimum Cost For Tickets](https://leetcode.com/problems/minimum-cost-for-tickets/) | [Python](./900-1000q/983.py)|Medium| |981|[Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store/) | [Python](./900-1000q/981.py)|Medium| |977|[Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/) | [Python](./900-1000q/977.py)|Easy| |926|[Flip String to Monotone Increasing](https://leetcode.com/problems/flip-string-to-monotone-increasing)|[Python](./900-1000q/926.py)|Medium| ##### [Problems 600-700](./600-700q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |681|[Next Closest Time ](https://leetcode.com/problems/next-closest-time)|[Python](./600-700q/681.py)|Medium| |674|[Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence)|[Python](./600-700/674.py)|Easy| |673|[Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence)|[Python](./600-700q/673.py)|Medium| ##### [Problems 400-500](./400-500Q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |482|[License Key Formatting](https://leetcode.com/problems/license-key-formatting)|[Python](./400-500q/482.py)|Easy| |454|[4Sum II](https://leetcode.com/problems/4sum-ii/)|[Python](./400-500Q/454.py)|Medium| |448|[Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array)|[Python](./400-500q/448.py)|Easy| |442|[Find All Duplicates in an Array](https://leetcode.com/problems/find-all-duplicates-in-an-array)|[Python](./400-500q/442.py)|Easy| |418|[Sentence Screen Fitting](https://leetcode.com/problems/sentence-screen-fitting)|[Python](./400-500q/418.py)|Medium| |410|[Split Array Largest Sum](https://leetcode.com/problems/split-array-largest-sum/) | [Python](./400-500Q/410.py)|Hard| ##### [Problems 300-400](./300-400q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |393|[UTF-8 Validation](https://leetcode.com/problems/utf-8-validation/)|[Python](./300-400q/393.py)|Medium| |388|[Longest Absolute File Path](https://leetcode.com/problems/longest-absolute-file-path)|[Python](./300-400q/388.py)|Medium| |387|[First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) | [Python](./300-400q/387.py)|Easy| |380|[Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/) | [Python](./300-400q/380.py)|Hard| |378|[Kth Smallest Element in a Sorted Matrix](https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix) | [Python](./300-400q/378.py)|Medium| |361|[Bomb Enemy](https://leetcode.com/problems/bomb-enemy)|[Python](./300-400q/361.py)|Medium| |350|[Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [Python](./300-400q/350.py)|Easy| |347|[Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) | [Python](./300-400q/347.py)|Medium| |346|[Moving Average from Data Stream](https://leetcode.com/problems/moving-average-from-data-stream)|[Python](./300-400q/346.py)|Easy| |340|[Longest Substring with At Most K Distinct Characters](https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters)|[Python](./300-400q/340.py)|Hard| |334|[Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) | [Python](./300-400q/334.py)|Medium| |332|[Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/)|[Python](./300-400q/332.py)|Medium| |329|[Longest Increasing Path in a Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/) | [Python](./300-400q/329.py)|Medium| |328|[Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) | [Python](./300-400q/328.py)|Easy| |326|[Power of Three](https://leetcode.com/problems/power-of-three/) | [Python](./300-400q/326.py)|Easy| |322|[Coin Change](https://leetcode.com/problems/coin-change/) | [Python](./300-400q/322.py)|Medium| |315|[Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/) | [Python](./300-400q/315.py)|Hard| |307|[Range Sum Query - Mutable](https://leetcode.com/problems/range-sum-query-mutable)|[Python](./300-400q/307.py)|Medium| |301|[Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses)|[Python](./300-400q/301.py)|Hard| ##### [Problems 200-300q](./200-300q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |300|[Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) | [Python](./200-300q/300.py)|Medium| |298|[Binary Tree Longest Consecutive Sequence ](https://leetcode.com/problems/binary-tree-longest-consecutive-sequence)|[Python](./200-300q/298.py)|Medium| |297|[Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree) | [Python](./200-300q/297.py)|Hard| |295|[Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) | [Python](./200-300q/295.py)|Hard| |289|[Game of Life](https://leetcode.com/problems/game-of-life) | [Python](/200-300q/289.py)|Medium| |287|[Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) | [Python](./200-300q/287.py)|Hard| |285|[Inorder Successor in BST](https://leetcode.com/problems/inorder-successor-in-bst) | [Python](./200-300q/285.py)|Medium| |283|[Move Zeros](https://leetcode.com/problems/move-zeroes)|[Python](./200-300q/283.py)|Easy| |281|[Zigzag Iterator](https://leetcode.com/problems/zigzag-iterator)|[Python](./200-300q/281.py)|Medium| |279|[Perfect Squares](https://leetcode.com/problems/perfect-squares/) | [Python](./200-300q/279.py)|Medium| |268|[Missing Number](https://leetcode.com/problems/missing-number)|[Python](./200-300q/268.py)|Easy| |257|[Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths)|[Python](./200-300q/257.py)|Easy| |253|[Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii) | [Python](./200-300q/253.py)|Medium| |240|[Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/)|[Python](./200-300q/240.py)|Medium| |239|[Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/)| [Python](./200-300q/239.py)|Hard| |238|[Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)| [Python](./200-300q/238.py)|Medium| |236|[Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)| [Python](./200-300q/236.py)|Medium| |235|[Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)|[Python](./200-300q/235.py)|Easy| |234|[Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)| [Python](./200-300q/234.py)|Easy| |230|[Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)| [Python](./200-300q/230.py)|Medium| |226|[Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree)|[Python](./200-300q/226.py)|Easy| |215|[Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)| [Python](./200-300q/215.py)|Medium| |210|[Course Schedule II](https://leetcode.com/problems/course-schedule-ii/)| [Python](./200-300q/210.py)|Medium| |208|[Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/)| [Python](./200-300q/208.py)|Medium| |207|[Course Schedule](https://leetcode.com/problems/course-schedule/)| [Python](./200-300q/207.py)|Medium| |206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)| [Python](./200-300q/206.py)|Easy| |203|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)| [Python](./200-300q/203.py)|Easy| |200|[Number of Islands](https://leetcode.com/problems/number-of-islands/)| [Python](./200-300q/200.py)|Medium| ##### [Problems 100-200](./100-200q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |199|[Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view)|[Python](./100-200q/199.py)|Medium| |191|[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/)| [Python](./100-200q/191.py)|Easy| |179|[Largest Number](https://leetcode.com/problems/largest-number/) | [Python](./100-200q/179.py)|Medium| |173|[Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator)|[Python](./100-200q/173.py)|Medium| |170|[Two Sum III - Data structure design](https://leetcode.com/problems/two-sum-iii-data-structure-design)|[Python](./100-200q/170.py)|Easy| |163|[Missing Ranges](https://leetcode.com/problems/missing-ranges)[Python](./100-200q/163.py)|Medium| |162|[Find Peak Element](https://leetcode.com/problems/find-peak-element/) | [Python](./100-200q/162.py)|Medium| |160|[Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) | [Python](./100-200q/160.py)|Easy| |159|[Longest Substring Which Contains 2 Unique Characters](https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters)|[Python](./100-200q/159.py)|Hard| |155|[Min Stack](https://leetcode.com/problems/min-stack/)| [Python](./100-200q/155.py)|Easy| |152|[Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/)| [Python](./100-200q/152.py)|Medium| |150|[Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/)|[Python](./100-200q/150.py)|Medium| |148|[Sort List](https://leetcode.com/problems/sort-list/)| [Python](./100-200q/148.py)|Medium| |147|[Insertion Sort List](https://leetcode.com/problems/insertion-sort-list/)| [Python](./100-200q/147.py)|Medium| |146|[LRU Cache](https://leetcode.com/problems/lru-cache/description/)|[Python](./100-200q/146.py)|Hard| |145|[Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/)| [Python](./100-200q/145.py)|Hard| |144|[Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)| [Python](.//100-200q/144.py)|Medium| |143|[Reorder List](https://leetcode.com/problems/reorder-list/)| [Python](./100-200q/143.py)|Medium| |142|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/)| [Python](./100-200q/142.py)|Medium| |141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)| [Python](./100-200q/141.py)|Medium| |139|[Word Break](https://leetcode.com/problems/word-break/)| [Python](./100-200q/139.py)|Medium| |134|[Gas Station](https://leetcode.com/problems/gas-station/)| [Python](./100-200q/134.py)|Medium| |132|[Palindrome Partitioning II](https://leetcode.com/problems/palindrome-partitioning-ii/)| [Python](./100-200q/132.py)|Hard| |131|[Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/)| [Python](./100-200q/131.py)|Medium| |130|[Surrounded Regions](https://leetcode.com/problems/surrounded-regions/)| [Python](./100-200q/130.py)|Medium| |129|[Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/)| [Python](./100-200q/129.py)|Medium| |128|[Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/)| [Python](./100-200q/128.py)|Hard| |127|[Word Ladder](https://leetcode.com/problems/word-ladder/)| [Python](./100-200q/127.py)|Medium| |125|[Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)| [Python](./100-200q/125.py)|Easy| |123|[Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/)| [Python](./100-200q/123.py)|Hard| |120|[Triangle](https://leetcode.com/problems/triangle/)| [Python](./100-200q/120.py)|Medium| |119|[Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/)| [Python](./100-200q/119.py)|Easy| |118|[Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)| [Python](./100-200q/118.py)|Easy| |117|[Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/)| [Python](./100-200q/117.py)|Hard| |116|[Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/)| [Python](./100-200q/116.py)|Medium| |115|[Distinct Subsequences](https://leetcode.com/problems/distinct-subsequences/)| [Python](./100-200q/115.py)|Hard| |113|[Path Sum II](https://leetcode.com/problems/path-sum-ii/)| [Python](./100-200q/113.py)|Medium| |112|[Path Sum](https://leetcode.com/problems/path-sum/)| [Python](./100-200q/112.py)|Easy| |111|[Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)|[Python](./100-200q/111.py)|Easy| |108|[Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)|[Python](./100-200q/108.py)|Easy| |107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)| [Python](./100-200q/107.py)|Easy| |106|[Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/)| [Python](./100-200q/106.py)|Medium| |105|[Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)| [Python](./100-200q/105.py)|Medium| |103|[Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)| [Python](./100-200q/103.py)|Medium| |102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)| [Python](./100-200q/102.py)|Easy| |101|[Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)| [Python](./100-200q/101.py)|Easy| |100|[Same Tree](https://leetcode.com/problems/same-tree/)| [Python](./100-200q/100.py)|Easy| ##### [Problems 1-100](./1-100q/) | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |99|[Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree)|[Python](./1-100q/99.py)|Hard| |98|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)| [Python](./1-100q/98.py)|Medium| |97|[Interleaving String](https://leetcode.com/problems/interleaving-string/)| [Python](./1-100q/97.py)|Hard| |95|[Unique Binary Search Trees II](https://leetcode.com/problems/unique-binary-search-trees-ii/)| [Python](./1-100q/95.py)|Medium| |94|[Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal)|[Python](./1-100q/94.py)|Medium| |93|[Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses/)| [Python](./1-100q/93.py)|Medium| |92|[Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/)| [Python](./1-100q/92.py)|Medium| |91|[Decode Ways](https://leetcode.com/problems/decode-ways/)| [Python](./1-100q/91.py)|Medium| |90|[Subsets II](https://leetcode.com/problems/subsets-ii/)| [Python](./1-100q/90.py)|Medium| |87|[Scramble String](https://leetcode.com/problems/scramble-string/)| [Python](./1-100q/87.py)|Hard| |86|[Partition List](https://leetcode.com/problems/partition-list/)| [Python](./1-100q/86.py)|Medium| |85|[Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle/)| [Python](./1-100q/85.py)|Hard| |83|[Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)| [Python](./1-100q/83.py)|Easy| |82|[Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/)| [Python](./1-100q/82.py)|Medium| |81|[Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)| [Python](./1-100q/81.py)|Medium| |80|[Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/)| [Python](./1-100q/80.py)|Medium| |79|[Word Search](https://leetcode.com/problems/word-search/)| [Python](./1-100q/79.py)|Medium| |78|[Subsets](https://leetcode.com/problems/subsets/)| [Python](./1-100q/78.py)|Medium| |75|[Sort Colors](https://leetcode.com/problems/sort-colors/)| [Python](./1-100q/75.py)|Medium| |74|[Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/)| [Python](./1-100q/74.py)|Medium| |73|[Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/)| [Python](./1-100q/73.py)|Medium| |72|[Edit Distance](https://leetcode.com/problems/edit-distance/)| [Python](./1-100q/72.py)|Hard| |71|[Simplify Path](https://leetcode.com/problems/simplify-path/)| [Python](./1-100q/71.py)|Medium| |70|[Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)| [Python](./1-100q/70.py)|Easy| |67|[Add Binary](https://leetcode.com/problems/add-binary/)| [Python](./1-100q/67.py)|Easy| |66|[Plus One](https://leetcode.com/problems/plus-one/)| [Python](./1-100q/66.py)|Easy| |65|[Valid Number](https://leetcode.com/problems/valid-number/)| [Python](./1-100q/65.py)|Easy| |64|[Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/)| [Python](./1-100q/64.py)|Medium| |63|[Unique Paths II](https://leetcode.com/problems/unique-paths-ii/)| [Python](./1-100q/63.py)|Medium| |62|[Unique Paths](https://leetcode.com/problems/unique-paths/)| [Python](./1-100q/62.py)|Medium| |61|[Rotate List](https://leetcode.com/problems/rotate-list/)| [Python](./1-100q/61.py)|Medium| |60|[Permutation Sequence](https://leetcode.com/problems/permutation-sequence/)| [Python](./1-100q/60.py)|Medium| |57|[Insert Interval](https://leetcode.com/problems/insert-interval/)| [Python](./1-100q/57.py)|Hard| |56|[Merge Intervals](https://leetcode.com/problems/merge-intervals/)| [Python](./1-100q/56.py)|Hard| |54|[Spiral Matrix](https://leetcode.com/problems/spiral-matrix/)| [Python](./1-100q/54.py)|Medium| |53|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)| [Python](./1-100q/53.py)|Medium| |48|[Rotate Image](https://leetcode.com/problems/rotate-image/)| [Python](./1-100q/48.py)|Medium| |46|[Permutations](https://leetcode.com/problems/permutations/)| [Python](./1-100q/46.py)|Medium| |45|[Jump Game II](https://leetcode.com/problems/jump-game-ii/)| [Python](./1-100q/45.py)|Hard| |44|[Wildcard Matching](https://leetcode.com/problems/wildcard-matching/)| [Python](./1-100q/44.py)|Hard| |42|[Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/)| [Python](./1-100q/42.py)|Hard| |41|[First Missing Positive](https://leetcode.com/problems/first-missing-positive/)| [Python](./1-100q/41.py)|Hard| |40|[Combination Sum II](https://leetcode.com/problems/combination-sum-ii/)| [Python](./1-100q/40.py)|Medium| |39|[Combination Sum](https://leetcode.com/problems/combination-sum/)| [Python](./1-100q/39.py)|Medium| |38|[Count and Say](https://leetcode.com/problems/count-and-say/)| [Python](./1-100q/38.py)|Easy| |36|[Valid Sudoku](https://leetcode.com/problems/valid-sudoku)|[Python](./1-100q/36.py)|Medium| |34|[Search for a Range](https://leetcode.com/problems/search-for-a-range/)| [Python](./1-100q/34.py)|Medium| |33|[Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)| [Python](./1-100q/33.py)|Hard| |32|[Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/)| [Python](./1-100q/32.py)|Hard| |31|[Next Permutation](https://leetcode.com/problems/next-permutation/)| [Python](./1-100q/31.py)|Medium| |30|[Substring with Concatenation of All Words](https://leetcode.com/problems/substring-with-concatenation-of-all-words/)| [Python](./1-100q/30.py)|Hard| |26|[Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)| [Python](./1-100q/26.py)|Easy| |25|[Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/)| [Python](./1-100q/25.py)|Hard| |24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/)| [Python](./1-100q/24.py)|Medium| |23|[Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/)| [Python](.//1-100q/23.py)|Hard| |22|[Generate Parentheses](https://leetcode.com/problems/generate-parentheses/)| [Python](./1-100q/22.py)|Medium| |19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)| [Python](./1-100q/19.py)|Easy| |18|[4Sum](https://leetcode.com/problems/4sum/)| [Python](./1-100q/18.py)|Medium| |17|[Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/)| [Python](./1-100q/17.py)|Medium| |16|[3Sum Closest](https://leetcode.com/problems/3sum-closest/)| [Python](./1-100q/16.py)|Medium| |15|[3Sum](https://leetcode.com/problems/3sum/)| [Python](./1-100q/15.py)|Medium| |14|[Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix)|[Python](./1-100q/14.py)|Easy| |11|[Container With Most Water](https://leetcode.com/problems/container-with-most-water/)| [Python](./1-100q/11.py)|Medium| |10|[Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/)| [Python](./1-100q/10.py)|Hard| |6|[ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion/)| [Python](./1-100q/06.py)|Easy| |5|[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)| [Python](./1-100q/05.py)|Medium| |4|[Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/)| [Python](./1-100q/4.py)|Hard| |3|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)| [Python](./1-100q/03.py)|Medium| |1|[Two Sum](https://leetcode.com/problems/two-sum/)| [Python](./1-100q/TwoSum.py)|Medium| ## time series note * The superior accuracy of the proposed model is primarily due to the deep learning framework comprising four independent LSTM networks, which provide an effec- tive means to approximate inherent invariant features and structures * In addition, the low- and high-frequency components exhibited in the PV solar datasets can be better extracted by WPD. * Each LSTM network could focus more on capturing the linear and nonlinear relationships between meteorological variables and PV power series. * WPD is more effective than WD for identifying weak, un-balanced, instantaneous, sudden, and singular components in a signal. * In practice, more accurate forecasting results indicate fewer un- certainties and fluctuations on PV power output. * Accuracy plays a crucial role for the rational planning and operation of electric power and energy systems with high penetration of PV power. * Hybrid methods hold an advantage over individual methods in terms of filtering any stochastic volatility. *