{"id":19311446,"url":"https://github.com/longluo/leetcode","last_synced_at":"2025-04-22T14:30:41.935Z","repository":{"id":38125061,"uuid":"58620185","full_name":"longluo/leetcode","owner":"longluo","description":"The Data Structures and Algorithms and LeetCode solutions","archived":false,"fork":false,"pushed_at":"2023-09-16T15:43:40.000Z","size":4119,"stargazers_count":86,"open_issues_count":1,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T00:35:57.464Z","etag":null,"topics":["algorithms","data-structures","data-structures-and-algorithms","java","leetcode","leetcode-solutions"],"latest_commit_sha":null,"homepage":"https://leetcode.com/longluo/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/longluo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-12T07:52:04.000Z","updated_at":"2025-02-25T01:20:40.000Z","dependencies_parsed_at":"2024-11-10T00:29:10.404Z","dependency_job_id":"93b71c79-fdf7-4442-80c9-2f65c10f3320","html_url":"https://github.com/longluo/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longluo%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longluo%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longluo%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longluo%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longluo","download_url":"https://codeload.github.com/longluo/leetcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250258773,"owners_count":21400970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-structures","data-structures-and-algorithms","java","leetcode","leetcode-solutions"],"created_at":"2024-11-10T00:28:59.369Z","updated_at":"2025-04-22T14:30:36.926Z","avatar_url":"https://github.com/longluo.png","language":"Java","readme":"# The LeetCode Solutions \n\n| # | Title | Solution | Difficulty |\n|---| ----- | -------- | ---------- |\n| No. | Problems | Difficulty | Source Code | Solution |\n|---- |----------|------------|-------------|----------|\n| 001 | [Two Sum](https://leetcode.com/problems/two-sum/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem1_twoSum.java) | [2种方法：暴力 和 HashMap](http://www.longluo.me/blog/2019/03/25/Leetcode-two-sum/) |\n| 002 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem2_addTwoNumbers.java) | [2种方法：模拟 和 递归](http://www.longluo.me/blog/2019/03/26/Leetcode-add-two-numbers/) |\n| 003 | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | Medium | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem3_longestSubstringWithoutRepeatingCharacters.java) |  |\n| 004 | [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem4_findMedianSortedArrays.java) | [4种方法：合并数组，暴力法，二分搜索，划分数组](http://www.longluo.me/blog/2021/02/17/Leetcode-median-of-two-sorted-arrays/) |\n| 005 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem5_longestPalindromeString.java) |  |\n| 010 | [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem10_regularExpressionMatching.java) |  |\n| 011 | [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem11_containerWithMostWater.java) | [2 Approaches: BF and Two Pointers with Image Explaination](http://www.longluo.me/blog/2022/04/05/Leetcode-container-with-most-water/) |\n| 015 | [3Sum](https://leetcode.com/problems/3sum/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem15_3Sum.java) | [3种方法：暴力，Hash，双指针](http://www.longluo.me/blog/2021/02/05/Leetcode-three-sum/) |\n| 017 | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem17_letterCombinationsOfAPhoneNumber.java) | [4 Approaches: BF 4 Loops, Backtracking, BFS, Queue with Image Explaination](http://www.longluo.me/blog/2022/05/09/Leetcode-letter-combinations-of-a-phone-number/) |\n| 019 | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem19_removeNthNodeFromEndOfList.java) |  |\n| 020 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem20_validParentheses.java) |  |\n| 021 | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem21_mergeTwoSortedList.java) |  |\n| 022 | [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem22_generateParenthesis.java) | [2种方法：暴力法 和 回溯法](http://www.longluo.me/blog/2020/11/11/Leetcode-generate-parenthesis/) |\n| 023 | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem23_mergeKSortedLists.java) |  |\n| 024 | [Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem24_swapNodesInPairs.java) |  |\n| 025 | [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) |Hard| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem25_reverseNodesInKGroup.java) |  |\n| 031 | [Next Permutation](https://leetcode.com/problems/next-permutation/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem31_nextPermutation.java) | [Two Pointers Solution with Detailed Explanation and Code Commented](http://www.longluo.me/blog/2022/04/03/Leetcode-next-permutation/) |\n| 032 | [Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem32_longestValidParentheses.java) |  |\n| 033 | [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem33_searchInRotatedSortedArray.java) |  |\n| 034 | [Search for a Range](https://leetcode.com/problems/search-for-a-range/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem34_findFirstAndLastPositionOfElementInSortedArray.java) |  |\n| 035 | [Search Insert Position](https://leetcode.com/problems/search-insert-position/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem35_searchInsertPosition.java) |  |\n| 039 | [Combination Sum](https://leetcode.com/problems/combination-sum/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem39_combinationSum.java) |  |\n| 042 | [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem42_trappingRainWater.java) |  |\n| 045 | [Jump Game II](https://leetcode-cn.com/problems/jump-game-ii/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem45_jumpGame_ii.java) |  |\n| 046 | [Permutations](https://leetcode.com/problems/permutations/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem46_permutations.java) |  |\n| 048 | [Rotate Image](https://leetcode.com/problems/rotate-image/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem48_rotateImage.java) |  |\n| 049 | [Group Anagrams](https://leetcode.com/problems/anagrams/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem49_groupAnagrams.java) |  |\n| 053 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem53_maximumSubarray.java) |  |\n| 055 | [Jump Game](https://leetcode.com/problems/jump-game/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem55_jumpGame.java) |  |\n| 056 | [Merge Intervals](https://leetcode.com/problems/merge-intervals/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem56_mergeIntervals.java) |  |\n| 062 | [Unique Paths](https://leetcode.com/problems/unique-paths/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem62_uniquePaths.java) |  |\n| 064 | [Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem64_minimumPathSum.java) |  |\n| 070 | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem70_climbingStairs.java) |  |\n| 072 | [Edit Distance](https://leetcode.com/problems/edit-distance/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem72_editDistance.java) |  |\n| 075 | [Sort Colors](https://leetcode.com/problems/sort-colors/)|Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem75_sortColors.java) |  |\n| 076 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring) | Hard| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem76_minimumWindowSubstring.java) |  |\n| 078 | [Subsets](https://leetcode.com/problems/subsets/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem78_subsets.java) |  |\n| 079 | [Word Search](https://leetcode.com/problems/word-search/)|Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem79_wordSearch.java) |  |\n| 084 | [Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem84_largestRectangleInHistogram.java) |  |\n| 085 | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem85_maximalRectangle.java) |  |\n| 094 | [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem94_binaryTreeInorderTraversal.java) |  |\n| 096 | [Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem96_uniqueBinarySearchTrees.java) |  |\n| 098 | [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem98_validateBinarySearchTree.java) |  |\n| 101 | [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem101_symmetricTree.java) |  |\n| 102 | [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem102_binaryTreeLevelOrderTraversal.java) |  |\n| 104 | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem104_maximumDepthOfBinaryTree.java) |  |\n| 105 | [Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem105_constructBinaryTreeFromPreorderAndInorderTraversal.java) |  |\n| 114 | [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem114_flattenBinaryTreeToLinkedList.java) |  |\n| 121 | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem121_bestTimeToBuyAndSellStock.java) |  |\n| 128 | [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem128_longestConsecutiveSequence.java) |  |\n| 136 | [Single Number](https://leetcode.com/problems/single-number) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem136_singleNumber.java) |  |\n| 139 | [Word Break](https://leetcode.com/problems/word-break/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem139_wordBreak.java) |  |\n| 141 | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem141_linkedListCycle.java) |  |\n| 142 | [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem142_linkedListCycle_ii.java) |  |\n| 146 | [LRU Cache](https://leetcode.com/problems/lru-cache/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem146_lruCache.java) |  |\n| 148 | [Sort List](https://leetcode.com/problems/sort-list/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem148_sortList.java) |  |\n| 152 | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem152_maximumProductSubarray.java) |  |\n| 155 | [Min Stack](https://leetcode.com/problems/min-stack/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem155_minStack.java) | [3种方法：辅助栈，栈，链表](http://www.longluo.me/blog/2021/02/23/Leetcode-min-stack/) |\n| 160 | [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem160_intersectionOfTwoLinkedLists.java) |  |\n| 169 | [Majority Element](https://leetcode.com/problems/majority-element/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem169_majorityElement.java) |  |\n| 198 | [House Robber](https://leetcode.com/problems/house-robber/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem198_houseRobber.java) |  |\n| 200 | [Number of Islands](https://leetcode.com/problems/number-of-islands/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem200_numberOfIslands.java) |  |\n| 206 | [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem206_reverseLinkedList.java) |  |\n| 207 | [Course Schedule](https://leetcode.com/problems/course-schedule/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem207_courseSchedule.java) |  |\n| 208 | [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem208_implementTriePrefixTree.java) |  |\n| 210 | [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem210_findOrder.java) |  |\n| 215 | [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem215_kthLargestElementInAnArray.java) |  |\n| 221 | [Maximal Square](https://leetcode.com/problems/maximal-square/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem221_maximalSquare.java) |  |\n| 226 | [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem226_invertBinaryTree.java) |  |\n| 230 | [Kth Smallest Element in a BST](https://leetcode.com/problems/invert-binary-tree/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem230_kthSmallestElementInABst.java) |  |\n| 234 | [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem234_palindromeLinkedList.java) |  |\n| 238 | [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem238_productOfArrayExceptSelf.java) |  |\n| 239 | [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem239_slidingWindowMaximum.java) |  |\n| 240 | [Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem240_searcha2DMatrix_ii.java) |  |\n| 253 | [Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii) |Medium| 没权限  |  |\n| 279 | [Perfect Squares](https://leetcode.com/problems/perfect-squares/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem279_perfectSquares.java) |  |\n| 283 | [Move Zeroes](https://leetcode.com/problems/move-zeroes/)| Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem283_moveZeroes.java) |  |\n| 287 | [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem287_findTheDuplicateNumber.java) | [9 Approaches: Count, Hash, Sort, Binary Search, Bit, Fast Slow Pointers](http://www.longluo.me/blog/2022/02/18/Leetcode-find-the-duplicate-number/) |\n| 297 | [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem297_serializeAndDeserializeBinaryTree.java)  |  |\n| 300 | [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem300_longestIncreasingSubsequence.java) |  |\n| 301 | [Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses/) |Hard| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem301_removeInvalidParentheses.java) |  |\n| 309 | [Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem309_bestTimeToBuyAndSellStockWithCooldown.java)  |  |\n| 312 | [Burst Balloons](https://leetcode.com/problems/burst-balloons/) | Hard | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem312_burstBalloons.java) |  |\n| 322 | [Coin Change](https://leetcode.com/problems/coin-change/)|Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem322_coinChange.java) |  |\n| 328 | [Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/)|Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem328_oddEvenLinkedList.java) |  |\n| 337 | [House Robber III](https://leetcode.com/problems/house-robber-iii/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem337_houseRobber_iii.java) |  |\n| 338 | [Counting Bits](https://leetcode.com/problems/counting-bits/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem338_countBits.java) |  |\n| 347 | [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem347_topKFrequentElements.java) |  |\n| 394 | [Decode String](https://leetcode.com/problems/decode-string/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem394_decodeString.java) |  |\n| 399 | [Evaluate Division](https://leetcode.com/problems/evaluate-division/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem399_evaluateDivision.java) |  |\n| 406 | [Queue Reconstruction by Height](https://leetcode.com/problems/queue-reconstruction-by-height/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem406_queueReconstructionByHeight.java) |  |\n| 416 | [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem416_partitionEqualSubsetSum.java) |  |\n| 437 | [Path Sum III](https://leetcode.com/problems/path-sum-iii/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem437_pathSum_iii.java) |  |\n| 438 | [Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/) | Easy |[Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem438_findAllAnagramsInAString.java) | [滑动窗口：从HashMap，数组，再到统计字母数量之差](http://www.longluo.me/blog/2021/11/28/Leetcode-find-all-anagrams-in-a-string/) |\n| 448 | [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem448_findAllNumbersDisappearedInAnArray.java) |  |\n| 461 | [Hamming Distance](https://leetcode.com/problems/hamming-distance/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem461_hammingDistance.java) |  |\n| 494 | [Target Sum](https://leetcode.com/problems/target-sum/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem494_targetSum.java) |  |\n| 538 | [Convert BST to Greater Tree](https://leetcode.com/problems/convert-bst-to-greater-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem538_convertBSTToGreaterTree.java) |  |\n| 543 | [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem543_diameterOfBinaryTree.java) |  |\n| 560 | [Subarray Sum Equals K](https://leetcode.com/problems/subarray-sum-equals-k) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem560_subarraySumEqualsK.java) |  |\n| 572 | [Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem572_subtreeOfAnotherTree.java) |  |\n| 581 | [Shortest Unsorted Continuous Subarray](https://leetcode.com/problems/shortest-unsorted-continuous-subarray/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem581_shortestUnsortedContinuousSubarray.java) |  |\n| 617 | [Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/) | Easy | [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem617_mergeTwoBinaryTrees.java) | [ 4 Approaches: Recursion, Iteration, BFS and DFS](http://www.longluo.me/blog/2022/04/12/Leetcode-merge-two-binary-trees/) |\n| 621 | [Task Scheduler](https://leetcode.com/problems/task-scheduler) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem621_taskScheduler.java) |  |\n| 647 | [Palindromic Substrings](https://leetcode.com/problems/palindromic-substrings) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem647_palindromicSubstrings.java) |  |\n| 739 | [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem739_dailyTemperatures.java) |  |\n| 763 | [Partition Labels](https://leetcode.com/problems/partition-labels/) |Medium| [Java](https://github.com/longluo/leetcode/blob/master/Java/src/com/longluo/top100/Problem763_partitionLabels.java) | [Illustration of the Max Position of the Char in the Partition with Easy Detailed Explanation](http://www.longluo.me/blog/2022/03/21/Leetcode-Partition-Labels) |\n\n\n\n## [LeetCode Problems List](https://github.com/longluo/leetcode/wiki/LeetCode-Problems-List)\n\n## [LeetCode Top 100 Liked Questions](https://github.com/longluo/leetcode/wiki/LeetCode-Top-100-Liked-Questions)\n\n## [Python Algorithms Cheatsheet](https://github.com/longluo/leetcode/wiki/Python-Algorithms-Cheatsheet)\n\n\n-------------------\n\n[我的Leetcode的解题](http://www.longluo.me/blog/2020/12/09/Leetcode-Solutions/)\n[《剑指Offer》刷题记录](http://www.longluo.me/blog/2020/12/20/Coding-Interviews/)\n\nWelcome to [My Website](http://www.longluo.me)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongluo%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongluo%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongluo%2Fleetcode/lists"}