{"id":15991943,"url":"https://github.com/lewiszlw/leetcode","last_synced_at":"2025-11-08T14:05:53.224Z","repository":{"id":105717987,"uuid":"177910697","full_name":"lewiszlw/leetcode","owner":"lewiszlw","description":"LeetCode problems' solutions implemented by java, c","archived":false,"fork":false,"pushed_at":"2021-06-17T08:55:23.000Z","size":375,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T12:47:44.670Z","etag":null,"topics":["algorithms","leetcode"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lewiszlw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-27T03:21:49.000Z","updated_at":"2021-06-17T08:55:26.000Z","dependencies_parsed_at":"2023-06-13T07:15:39.887Z","dependency_job_id":null,"html_url":"https://github.com/lewiszlw/leetcode","commit_stats":{"total_commits":146,"total_committers":2,"mean_commits":73.0,"dds":0.3287671232876712,"last_synced_commit":"041e5d8fcc5bb12178b7e310b9f85560b625dee4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lewiszlw/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewiszlw%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewiszlw%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewiszlw%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewiszlw%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewiszlw","download_url":"https://codeload.github.com/lewiszlw/leetcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewiszlw%2Fleetcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265314416,"owners_count":23745263,"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","leetcode"],"created_at":"2024-10-08T06:04:31.909Z","updated_at":"2025-11-08T14:05:53.180Z","avatar_url":"https://github.com/lewiszlw.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/lewiszlw/notebooks/master/assets/leetcode/leetcode-icon.jpeg\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/103/2122-Solved/Total-blue.svg\" alt=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Easy-48-green.svg\" alt=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Medium-49-orange.svg\" alt=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Hard-6-red.svg\" alt=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/language-java|c-yellow.svg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n## TODO\n对自己解法不满意，或者想看看他人解法：\n- No.28 Implement strStr()\n- No.119 Pascal's Triangle II\n- No.167 Two Sum II - Input array is sorted\n- No.169 Majority Element\n- No.217 Contains Duplicate\n- No.543 Diameter of Binary Tree\n- No.211 Add and Search Word - Data structure design\n\n\n需回顾解法：\n\n## LeetCode (Java)\n\n[No.118 Pascal's Triangle](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0118PascalsTriangle.java)\n- solution (runtime: 100%)\n\n[No.119 Pascal's Triangle II](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0119PascalsTriangleII.java)\n- solution (runtime: 10.19%)\n\n[No.125 Valid Palindrome](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0125ValidPalindrome.java)\n- solution (runtime: 96.33%)\n\n[No.136 Single Number](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_136SingleNumber.java)\n- solution (runtime: 100%)\n\n[No.160 Intersection of Two Linked Lists](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0160IntersectionOfTwoLinkedLists.java)\n- solution (runtime: 98.18%)\n\nNo.167 Two Sum II - Input array is sorted\n- [solution1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0167TwoSumII.java) (runtime: 30.22%)\n- [solution2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0167TwoSumII.java) (runtime: 16.67%)\n\nNo.169 Majority Element\n- [solution1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0169MajorityElement.java) (runtime: 29.57%)\n\n[No.171 Excel Sheet Column Number](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0171ExcelSheetColumnNumber.java)\n- solution (runtime: 99.9%)\n\n[No.217 Contains Duplicate](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0217ContainsDuplicate.java)\n- solution (runtime: 56.7%)\n\n[No.231 Power of Two](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0231PowerOfTwo.java)\n- solution (runtime: 93.16%)\n\n| # | Title | Difficulty | Solution |\n|---|-------|------------|-----------|\n| 1 | [Two Sum](https://leetcode.com/problems/two-sum/description/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0001TwoSum.java) (99.73%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0001TwoSum.java) (99.73%) |\n| 2 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0002AddTwoNumbers.java) (97.82%) |\n| 3 | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/description/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0003LongestSubstringWithoutRepeatingCharacters.java) (7.12%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0003LongestSubstringWithoutRepeatingCharacters.java) (51.84%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0003LongestSubstringWithoutRepeatingCharacters.java) (86.02%) |\n| 4 | [Median of Two Sorted Arrays](https://leetcode-cn.com/problems/median-of-two-sorted-arrays/) | Hard | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0004MedianOfTwoSortedArrays.java) (82.43%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0004MedianOfTwoSortedArrays.java) (82.39%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0004MedianOfTwoSortedArrays.java) (82.30%) |\n| 5 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/description/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0005LongestPalindromicSubstring.java) (60.07%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0005LongestPalindromicSubstring.java) (26.01%) |\n| 7 | [Reverse Integer](https://leetcode.com/problems/reverse-integer/description/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0007ReverseInteger.java) (88.97%) |\n| 9 | [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0009PalindromeNumber.java) (91.65%) |\n| 13 | [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0013RomanToInteger.java) (92.7%) |\n| 14 | [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0014LongestCommonPrefix.java) (95.31%) |\n| 15 | [3Sum](https://leetcode-cn.com/problems/3sum/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0015ThreeSum.java) (Time Limit Exceeded)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0015ThreeSum.java) (20.11%) |\n| 20 | [Valid Parentheses](https://leetcode-cn.com/problems/valid-parentheses/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0020ValidParentheses.java) (93.12%) |\n| 21 | [Merge Two Sorted Lists](https://leetcode-cn.com/problems/merge-two-sorted-lists/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0021MergeTwoSortedLists.java) (100%) |\n| 23 | [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/description/) | Hard | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0023MergeKSortedLists.java) (5%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0023MergeKSortedLists.java) (99.25%) |\n| 26 | [Remove Duplicates from Sorted Array](https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0026RemoveDuplicatesFromSortedArray.java) (99.99%) |\n| 27 | [Remove Element](https://leetcode-cn.com/problems/remove-element/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0027RemoveElement.java) (100%) |\n| 28 | [Implement strStr()](https://leetcode-cn.com/problems/implement-strstr/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0028ImplementstrStr.java) (92.33%) |\n| 31 | [Next Permutation](https://leetcode-cn.com/problems/next-permutation/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0031NextPermutation.java) (97.87%) |\n| 33 | [Search in Rotated Sorted Array](https://leetcode-cn.com/problems/search-in-rotated-sorted-array/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0033SearchInRotatedSortedArray.java) (100%) |\n| 35 | [Search Insert Position](https://leetcode-cn.com/problems/search-insert-position/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0035SearchInsertPosition.java) (100%) |\n| 38 | [Count and Say](https://leetcode-cn.com/problems/count-and-say/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0038CountAndSay.java) (86.04%) |\n| 42 | [Trapping Rain Water](https://leetcode-cn.com/problems/trapping-rain-water/) | Hard | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0042TrappingRainWater.java) (Time Limit Execeeded)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0042TrappingRainWater.java) (11.06%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0042TrappingRainWater.java) (48.54%) |\n| 43 | [Multiply Strings](https://leetcode-cn.com/problems/multiply-strings/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0043MultiplyStrings.java) (59.19%) |\n| 46 | [Permutations](https://leetcode-cn.com/problems/permutations/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0046Permutations.java) (22.65%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0046Permutations.java) (53.36%) |\n| 47 | [Permutations II](https://leetcode-cn.com/problems/permutations-ii/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0047PermutationsII.java) (10.89%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0047PermutationsII.java) ( 35.05%) |\n| 48 | [Rotate Image](https://leetcode.com/problems/rotate-image/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0048RotateImage.java) (100%) |\n| 53 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/description/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0053MaximumSubarray.java) (95.05%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0053MaximumSubarray.java) (94.97%) | \n| 56 | [Merge Intervals](https://leetcode-cn.com/problems/merge-intervals/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0056MergeIntervals.java) (11.91%) |\n| 58 | [Length of Last Word](https://leetcode-cn.com/problems/length-of-last-word/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0058LengthOfLastWord.java) (87.88%) |\n| 60 | [Permutation Sequence](https://leetcode-cn.com/problems/permutation-sequence/) | Hard | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0060PermutationSequence.java) (55.48%) |\n| 66 | [Plus One](https://leetcode-cn.com/problems/plus-one/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0066PlusOne.java) (100%) |\n| 67 | [Add Binary](https://leetcode-cn.com/problems/add-binary/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0067AddBinary.java) (62.48%) |\n| 69 | [Sqrt(x)](https://leetcode-cn.com/problems/sqrtx/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0069Sqrtx.java) (80.29%) |\n| 70 | [Climbing Stairs](https://leetcode-cn.com/problems/climbing-stairs/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0070ClimbingStairs.java) (Time Limit Exceeded)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0070ClimbingStairs.java) (100%) |\n| 71 | [Simplify Path](https://leetcode-cn.com/problems/simplify-path/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0071SimplifyPath.java) (98.51%) |\n| 83 | [Remove Duplicates from Sorted List](https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0083RemoveDuplicatesFromSortedList.java) (100%) |\n| 88 | [Merge Sorted Array](https://leetcode-cn.com/problems/merge-sorted-array/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0088MergeSortedArray.java) (24.54%) |\n| 93 | [Restore IP addresses](https://leetcode-cn.com/problems/restore-ip-addresses/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0093RestoreIPAddresses.java) (61.07%) |\n| 100 | [Same Tree](https://leetcode-cn.com/problems/same-tree/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0100SameTree.java) (100%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0100SameTree.java) (100%) |\n| 101 | [Symmetric Tree](https://leetcode-cn.com/problems/symmetric-tree/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0101SymmetricTree.java) (100%) |\n| 103 | [Binary Tree Zigzag Level Order Traversal](https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0103BinaryTreeZigzagLevelOrderTraversal.java) (98.63%) |\n| 104 | [Maximum Depth of Binary Tree](https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0104MaximumDepthOfBinaryTree.java) (100%) |\n| 107 | [Binary Tree Level Order Traversal II](https://leetcode-cn.com/problems/binary-tree-level-order-traversal-ii/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0107BinaryTreeLevelOrderTraversalII.java) (10.38%) |\n| 110 | [Balanced Binary Tree](https://leetcode-cn.com/problems/balanced-binary-tree/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0110BalancedBinaryTree.java) (80.4%) |\n| 111 | [Minimum Depth of Binary Tree](https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0111MinimumDepthOfBinaryTree.java) (100%) |\n| 112 | [Path Sum](https://leetcode-cn.com/problems/path-sum/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0112PathSum.java) (100%) |\n| 114 | [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0114FlattenBinaryTreeToLinkedList.java) (23.09%) |\n| 121 | [Best Time to Buy and Sell Stock](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0121BestTimeToBuyAndSellStock.java) (80.79%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0121BestTimeToBuyAndSellStock.java) (19.29%) |\n| 122 | [Best Time to Buy and Sell Stock II](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0122BestTimeToBuyAndSellStockII.java) (99.61%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0122BestTimeToBuyAndSellStockII.java) (99.61%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0122BestTimeToBuyAndSellStockII.java) (19.44%) |\n| 128 | [Longest Consecutive Sequence](https://leetcode-cn.com/problems/longest-consecutive-sequence//) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0128LongestConsecutiveSequence.java) (21.12%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0128LongestConsecutiveSequence.java) (23.41%) |\n| 134 | [Gas Station](https://leetcode-cn.com/problems/gas-station/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0134GasStation.java) (47.90%) |\n| 139 | [Word Break](https://leetcode-cn.com/problems/word-break/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0139WordBreak.java) (69.12%) |\n| 142 | [Linked List Cycle II](https://leetcode-cn.com/problems/linked-list-cycle-ii/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0142LinkedListCycleII.java) (20.63%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0142LinkedListCycleII.java) (100%) |\n| 146 | [LRU Cache](https://leetcode-cn.com/problems/lru-cache/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0146LRUCache.java) (7.67%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0146LRUCache2.java) (60.13%) |\n| 148 | [Sort List](https://leetcode-cn.com/problems/sort-list/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0148SortList.java) (47.85%) |\n| 151 | [Reverse Words in a String](https://leetcode-cn.com/problems/reverse-words-in-a-string/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0151ReverseWordsInAString.java) (35.09%) |\n| 155 | [Min Stack](https://leetcode-cn.com/problems/min-stack/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0155MinStack.java) (94.32%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0155MinStack2.java) (32.33%) |\n| 206 | [Reverse Linked List](https://leetcode-cn.com/problems/reverse-linked-list//) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0206ReverseLinkedList.java) (100%) |\n| 211 | [Add and Search Word - Data structure design](https://leetcode.com/problems/add-and-search-word-data-structure-design/description/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0211AddAndSearchWord_DataStructureDesign.java) (6.91%) |\n| 215 | [Kth Largest Element in an Array](https://leetcode-cn.com/problems/kth-largest-element-in-an-array/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0215KthLargestElementInAnArray.java) (91.34%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0215KthLargestElementInAnArray.java) (91.31%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0215KthLargestElementInAnArray.java) (36.53%) |\n| 221 | [Maximal Square](https://leetcode-cn.com/problems/maximal-square/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0221MaximalSquare.java) (88.87%) |\n| 232 | [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0232ImplementQueueUsingStacks.java) (82.99%) |\n| 236 | [Lowest Common Ancestor of a Binary Tree](https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0236LowestCommonAncestorOfABinaryTree.java) (13.50%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0236LowestCommonAncestorOfABinaryTree.java) (49.32%) |\n| 240 | [Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0240SearchA2DMatrixII.java) (100%) |\n| 295 | [Find Median From Data Stream](https://leetcode-cn.com/problems/find-median-from-data-stream/) | Hard | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0295FindMedianFromDataStream.java) (22.81%)、[Java2]() (TODO) |\n| 300 | [Longest Increasing Subsequence](https://leetcode-cn.com/problems/longest-increasing-subsequence/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0300LongestIncreasingSubsequence.java) (21.37%)、[Java2]() (TODO) |\n| 347 | [Top K Frequent Elements](https://leetcode-cn.com/problems/top-k-frequent-elements/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0347TopKFrequentElements.java) (40.91%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0347TopKFrequentElements.java) (40.96%) |\n| 374 | [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0374GuessNumberHigherOrLower.java) (100%) |\n| 416 | [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/description/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0416PartitionEqualSubsetSum.java) (68.65%)\n| 445 | [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0445AddTwoNumbersII.java) (93.92%) |\n| 460 | [LFU Cache](https://leetcode-cn.com/problems/lfu-cache/) | Hard | [Java1]() (TODO)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0460LFUCache2.java) (5.31%) |\n| 470 | [Implement Rand10() Using Rand7()](https://leetcode-cn.com/problems/implement-rand10-using-rand7/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0470ImplementRand10UsingRand7.java) (12.67%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0470ImplementRand10UsingRand7.java) (37.08%) |\n| 494 | [Target Sum](https://leetcode-cn.com/problems/target-sum/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0494TargetSum.java) (36.04%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0494TargetSum.java) (65.88%%) |\n| 496 | [Next Greater Element I](https://leetcode-cn.com/problems/next-greater-element-i/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0496NextGreaterElementI.java) (93.29%) |\n| 543 | [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0543DiameterOfBinaryTree.java) (61.25%) |\n| 547 | [Number of Provinces](https://leetcode-cn.com/problems/number-of-provinces/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0547NumberOfProvinces.java) (28.00%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0547NumberOfProvinces.java) (21.82%) |\n| 560 | [Subarray Sum Equals K](https://leetcode-cn.com/problems/subarray-sum-equals-k/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0560SubarraySumEqualsK.java) (5.04%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0560SubarraySumEqualsK.java) (54.65%) |\n| 567 | [Permutation in String](https://leetcode-cn.com/problems/permutation-in-string/) | Medium | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0567PermutationInString.java) (5.00%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0567PermutationInString.java) (15.92%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0567PermutationInString.java) (58.20%%) |\n| 583 | [Delete Operation for Two Strings](https://leetcode.com/problems/delete-operation-for-two-strings/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0583DeleteOperationForTwoStrings.java) (52.53%) |\n| 674 | [Longest Continuous Increasing Subsequence](https://leetcode-cn.com/problems/longest-continuous-increasing-subsequence/) | Easy | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0674LongestContinuousIncreasingSubsequence.java) (100.00%) |\n| 718 | [Maximum Length of Repeated Subarray](https://leetcode.com/problems/maximum-length-of-repeated-subarray/description/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0718MaximumLengthOfRepeatedSubarray.java) (87.36%) |\n| 771 | [Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | Easy | [Java1](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0771JewelsAndStones.java) (64.06%)、[Java2](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0771JewelsAndStones.java) (98.24%)、[Java3](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_0771JewelsAndStones.java) (59.1%) |\n| 1143 | [Longest Common Subsequence](https://leetcode-cn.com/problems/longest-common-subsequence/) | Medium | [Java](https://github.com/lewiszlw/leetcode/blob/master/leetcode-java/src/main/java/leetcode/algorithms/_1143LongestCommonSubsequence.java) (69.54%) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewiszlw%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewiszlw%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewiszlw%2Fleetcode/lists"}