From 87c8048afb921098e13749d57743aa824ece59e2 Mon Sep 17 00:00:00 2001 From: YDZ Date: Wed, 28 Apr 2021 08:40:36 +0800 Subject: [PATCH] =?UTF-8?q?Add=20solution=200938=E3=80=811642?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 680 +++++++++--------- .../938. Range Sum of BST.go | 34 + .../938. Range Sum of BST_test.go | 53 ++ leetcode/0938.Range-Sum-of-BST/README.md | 80 +++ .../1642. Furthest Building You Can Reach.go | 40 ++ ...2. Furthest Building You Can Reach_test.go | 59 ++ .../README.md | 113 +++ .../0900~0999/0933.Number-of-Recent-Calls.md | 2 +- .../0900~0999/0938.Range-Sum-of-BST.md | 87 +++ .../0900~0999/0942.DI-String-Match.md | 2 +- .../1641.Count-Sorted-Vowel-Strings.md | 2 +- .../1642.Furthest-Building-You-Can-Reach.md | 120 ++++ .../1646.Get-Maximum-in-Generated-Array.md | 2 +- website/content/ChapterTwo/Array.md | 44 +- website/content/ChapterTwo/Backtracking.md | 10 +- website/content/ChapterTwo/Binary_Search.md | 16 +- .../content/ChapterTwo/Bit_Manipulation.md | 14 +- .../ChapterTwo/Breadth_First_Search.md | 10 +- .../content/ChapterTwo/Depth_First_Search.md | 21 +- .../content/ChapterTwo/Dynamic_Programming.md | 22 +- website/content/ChapterTwo/Hash_Table.md | 10 +- website/content/ChapterTwo/Linked_List.md | 18 +- website/content/ChapterTwo/Math.md | 22 +- website/content/ChapterTwo/Sliding_Window.md | 6 +- website/content/ChapterTwo/Sort.md | 6 +- website/content/ChapterTwo/Stack.md | 12 +- website/content/ChapterTwo/String.md | 22 +- website/content/ChapterTwo/Tree.md | 15 +- website/content/ChapterTwo/Two_Pointers.md | 16 +- website/content/ChapterTwo/Union_Find.md | 2 +- 30 files changed, 1064 insertions(+), 476 deletions(-) create mode 100644 leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST.go create mode 100644 leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST_test.go create mode 100644 leetcode/0938.Range-Sum-of-BST/README.md create mode 100644 leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach.go create mode 100644 leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach_test.go create mode 100644 leetcode/1642.Furthest-Building-You-Can-Reach/README.md create mode 100644 website/content/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md create mode 100644 website/content/ChapterFour/1600~1699/1642.Furthest-Building-You-Can-Reach.md diff --git a/README.md b/README.md index 55889f02..b8c0c40c 100755 --- a/README.md +++ b/README.md @@ -127,15 +127,15 @@ | | Easy | Medium | Hard | Total | |:--------:|:--------:|:--------:|:--------:|:--------:| |Optimizing|36|37|17|90| -|Accepted|**276**|**368**|**107**|**751**| +|Accepted|**277**|**369**|**107**|**753**| |Total|481|972|388|1841| -|Perfection Rate|87.0%|89.9%|84.1%|88.0%| -|Completion Rate|57.4%|37.9%|27.6%|40.8%| +|Perfection Rate|87.0%|90.0%|84.1%|88.0%| +|Completion Rate|57.6%|38.0%|27.6%|40.9%| |------------|----------------------------|----------------------------|----------------------------|----------------------------| ## 二. 目录 -以下已经收录了 661 道题的题解,还有 11 道题在尝试优化到 beats 100% +以下已经收录了 663 道题的题解,还有 11 道题在尝试优化到 beats 100% | No. | Title | Solution | Acceptance | Difficulty | Frequency | |:--------:|:--------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:| @@ -153,7 +153,7 @@ |0012|Integer to Roman|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0012.Integer-to-Roman)|57.2%|Medium|| |0013|Roman to Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0013.Roman-to-Integer)|57.1%|Easy|| |0014|Longest Common Prefix||36.3%|Easy|| -|0015|3Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0015.3Sum)|28.3%|Medium|| +|0015|3Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0015.3Sum)|28.4%|Medium|| |0016|3Sum Closest|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0016.3Sum-Closest)|46.4%|Medium|| |0017|Letter Combinations of a Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0017.Letter-Combinations-of-a-Phone-Number)|50.0%|Medium|| |0018|4Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0018.4Sum)|35.2%|Medium|| @@ -165,7 +165,7 @@ |0024|Swap Nodes in Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0024.Swap-Nodes-in-Pairs)|53.7%|Medium|| |0025|Reverse Nodes in k-Group|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0025.Reverse-Nodes-in-k-Group)|45.6%|Hard|| |0026|Remove Duplicates from Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0026.Remove-Duplicates-from-Sorted-Array)|46.9%|Easy|| -|0027|Remove Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0027.Remove-Element)|49.5%|Easy|| +|0027|Remove Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0027.Remove-Element)|49.6%|Easy|| |0028|Implement strStr()|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0028.Implement-strStr())|35.4%|Easy|| |0029|Divide Two Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0029.Divide-Two-Integers)|16.9%|Medium|| |0030|Substring with Concatenation of All Words|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0030.Substring-with-Concatenation-of-All-Words)|26.4%|Hard|| @@ -176,17 +176,17 @@ |0035|Search Insert Position|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0035.Search-Insert-Position)|42.9%|Easy|| |0036|Valid Sudoku|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0036.Valid-Sudoku)|51.0%|Medium|| |0037|Sudoku Solver|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0037.Sudoku-Solver)|47.3%|Hard|| -|0038|Count and Say||46.3%|Medium|| +|0038|Count and Say||46.4%|Medium|| |0039|Combination Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0039.Combination-Sum)|59.9%|Medium|| |0040|Combination Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0040.Combination-Sum-II)|50.5%|Medium|| |0041|First Missing Positive|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0041.First-Missing-Positive)|34.1%|Hard|| -|0042|Trapping Rain Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0042.Trapping-Rain-Water)|51.7%|Hard|| +|0042|Trapping Rain Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0042.Trapping-Rain-Water)|51.8%|Hard|| |0043|Multiply Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0043.Multiply-Strings)|35.2%|Medium|| |0044|Wildcard Matching||25.6%|Hard|| |0045|Jump Game II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0045.Jump-Game-II)|31.8%|Medium|| |0046|Permutations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0046.Permutations)|67.3%|Medium|| |0047|Permutations II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0047.Permutations-II)|50.0%|Medium|| -|0048|Rotate Image|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0048.Rotate-Image)|61.0%|Medium|| +|0048|Rotate Image|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0048.Rotate-Image)|61.2%|Medium|| |0049|Group Anagrams|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0049.Group-Anagrams)|59.9%|Medium|| |0050|Pow(x, n)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0050.Pow(x,-n))|31.1%|Medium|| |0051|N-Queens|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0051.N-Queens)|50.4%|Hard|| @@ -197,10 +197,10 @@ |0056|Merge Intervals|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0056.Merge-Intervals)|41.5%|Medium|| |0057|Insert Interval|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0057.Insert-Interval)|35.4%|Medium|| |0058|Length of Last Word||33.5%|Easy|| -|0059|Spiral Matrix II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0059.Spiral-Matrix-II)|58.3%|Medium|| +|0059|Spiral Matrix II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0059.Spiral-Matrix-II)|58.4%|Medium|| |0060|Permutation Sequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0060.Permutation-Sequence)|39.7%|Hard|| |0061|Rotate List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0061.Rotate-List)|32.0%|Medium|| -|0062|Unique Paths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0062.Unique-Paths)|56.4%|Medium|| +|0062|Unique Paths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0062.Unique-Paths)|56.5%|Medium|| |0063|Unique Paths II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0063.Unique-Paths-II)|35.4%|Medium|| |0064|Minimum Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0064.Minimum-Path-Sum)|56.6%|Medium|| |0065|Valid Number||16.1%|Hard|| @@ -210,9 +210,9 @@ |0069|Sqrt(x)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0069.Sqrt(x))|35.5%|Easy|| |0070|Climbing Stairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0070.Climbing-Stairs)|48.8%|Easy|| |0071|Simplify Path|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0071.Simplify-Path)|35.0%|Medium|| -|0072|Edit Distance||47.2%|Hard|| +|0072|Edit Distance||47.3%|Hard|| |0073|Set Matrix Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0073.Set-Matrix-Zeroes)|44.7%|Medium|| -|0074|Search a 2D Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0074.Search-a-2D-Matrix)|38.2%|Medium|| +|0074|Search a 2D Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0074.Search-a-2D-Matrix)|38.3%|Medium|| |0075|Sort Colors|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0075.Sort-Colors)|50.0%|Medium|| |0076|Minimum Window Substring|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0076.Minimum-Window-Substring)|36.3%|Hard|| |0077|Combinations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0077.Combinations)|58.2%|Medium|| @@ -221,7 +221,7 @@ |0080|Remove Duplicates from Sorted Array II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0080.Remove-Duplicates-from-Sorted-Array-II)|46.5%|Medium|| |0081|Search in Rotated Sorted Array II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0081.Search-in-Rotated-Sorted-Array-II)|33.7%|Medium|| |0082|Remove Duplicates from Sorted List II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0082.Remove-Duplicates-from-Sorted-List-II)|39.6%|Medium|| -|0083|Remove Duplicates from Sorted List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0083.Remove-Duplicates-from-Sorted-List)|46.7%|Easy|| +|0083|Remove Duplicates from Sorted List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0083.Remove-Duplicates-from-Sorted-List)|46.8%|Easy|| |0084|Largest Rectangle in Histogram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0084.Largest-Rectangle-in-Histogram)|37.5%|Hard|| |0085|Maximal Rectangle||39.8%|Hard|| |0086|Partition List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0086.Partition-List)|44.9%|Medium|| @@ -232,7 +232,7 @@ |0091|Decode Ways|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0091.Decode-Ways)|27.0%|Medium|| |0092|Reverse Linked List II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0092.Reverse-Linked-List-II)|40.9%|Medium|| |0093|Restore IP Addresses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0093.Restore-IP-Addresses)|38.0%|Medium|| -|0094|Binary Tree Inorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0094.Binary-Tree-Inorder-Traversal)|66.4%|Medium|| +|0094|Binary Tree Inorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0094.Binary-Tree-Inorder-Traversal)|66.5%|Medium|| |0095|Unique Binary Search Trees II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0095.Unique-Binary-Search-Trees-II)|43.2%|Medium|| |0096|Unique Binary Search Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0096.Unique-Binary-Search-Trees)|54.8%|Medium|| |0097|Interleaving String||32.8%|Medium|| @@ -250,26 +250,26 @@ |0109|Convert Sorted List to Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0109.Convert-Sorted-List-to-Binary-Search-Tree)|50.8%|Medium|| |0110|Balanced Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0110.Balanced-Binary-Tree)|44.9%|Easy|| |0111|Minimum Depth of Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0111.Minimum-Depth-of-Binary-Tree)|39.9%|Easy|| -|0112|Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0112.Path-Sum)|42.7%|Easy|| +|0112|Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0112.Path-Sum)|42.8%|Easy|| |0113|Path Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0113.Path-Sum-II)|49.7%|Medium|| |0114|Flatten Binary Tree to Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0114.Flatten-Binary-Tree-to-Linked-List)|52.6%|Medium|| |0115|Distinct Subsequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0115.Distinct-Subsequences)|40.1%|Hard|| -|0116|Populating Next Right Pointers in Each Node||49.8%|Medium|| -|0117|Populating Next Right Pointers in Each Node II||42.5%|Medium|| +|0116|Populating Next Right Pointers in Each Node||49.9%|Medium|| +|0117|Populating Next Right Pointers in Each Node II||42.6%|Medium|| |0118|Pascal's Triangle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0118.Pascal's-Triangle)|55.7%|Easy|| |0119|Pascal's Triangle II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0119.Pascal's-Triangle-II)|52.7%|Easy|| |0120|Triangle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0120.Triangle)|46.9%|Medium|| |0121|Best Time to Buy and Sell Stock|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0121.Best-Time-to-Buy-and-Sell-Stock)|51.9%|Easy|| |0122|Best Time to Buy and Sell Stock II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0122.Best-Time-to-Buy-and-Sell-Stock-II)|58.9%|Easy|| -|0123|Best Time to Buy and Sell Stock III||40.2%|Hard|| +|0123|Best Time to Buy and Sell Stock III||40.3%|Hard|| |0124|Binary Tree Maximum Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0124.Binary-Tree-Maximum-Path-Sum)|35.7%|Hard|| -|0125|Valid Palindrome|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0125.Valid-Palindrome)|38.6%|Easy|| +|0125|Valid Palindrome|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0125.Valid-Palindrome)|38.7%|Easy|| |0126|Word Ladder II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0126.Word-Ladder-II)|23.9%|Hard|| |0127|Word Ladder|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0127.Word-Ladder)|32.3%|Hard|| |0128|Longest Consecutive Sequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0128.Longest-Consecutive-Sequence)|46.6%|Hard|| -|0129|Sum Root to Leaf Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0129.Sum-Root-to-Leaf-Numbers)|51.4%|Medium|| +|0129|Sum Root to Leaf Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0129.Sum-Root-to-Leaf-Numbers)|51.5%|Medium|| |0130|Surrounded Regions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0130.Surrounded-Regions)|29.9%|Medium|| -|0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|52.8%|Medium|| +|0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|52.9%|Medium|| |0132|Palindrome Partitioning II||31.4%|Hard|| |0133|Clone Graph||40.1%|Medium|| |0134|Gas Station||41.7%|Medium|| @@ -278,15 +278,15 @@ |0137|Single Number II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0137.Single-Number-II)|54.2%|Medium|| |0138|Copy List with Random Pointer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0138.Copy-List-with-Random-Pointer)|41.7%|Medium|| |0139|Word Break||42.0%|Medium|| -|0140|Word Break II||35.6%|Hard|| +|0140|Word Break II||35.7%|Hard|| |0141|Linked List Cycle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0141.Linked-List-Cycle)|43.2%|Easy|| |0142|Linked List Cycle II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0142.Linked-List-Cycle-II)|40.1%|Medium|| -|0143|Reorder List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0143.Reorder-List)|41.2%|Medium|| +|0143|Reorder List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0143.Reorder-List)|41.3%|Medium|| |0144|Binary Tree Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0144.Binary-Tree-Preorder-Traversal)|58.0%|Medium|| |0145|Binary Tree Postorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0145.Binary-Tree-Postorder-Traversal)|58.2%|Medium|| -|0146|LRU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0146.LRU-Cache)|36.4%|Medium|| -|0147|Insertion Sort List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0147.Insertion-Sort-List)|44.7%|Medium|| -|0148|Sort List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0148.Sort-List)|46.8%|Medium|| +|0146|LRU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0146.LRU-Cache)|36.5%|Medium|| +|0147|Insertion Sort List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0147.Insertion-Sort-List)|44.8%|Medium|| +|0148|Sort List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0148.Sort-List)|46.9%|Medium|| |0149|Max Points on a Line||17.8%|Hard|| |0150|Evaluate Reverse Polish Notation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0150.Evaluate-Reverse-Polish-Notation)|38.4%|Medium|| |0151|Reverse Words in a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0151.Reverse-Words-in-a-String)|24.3%|Medium|| @@ -295,22 +295,22 @@ |0154|Find Minimum in Rotated Sorted Array II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0154.Find-Minimum-in-Rotated-Sorted-Array-II)|42.2%|Hard|| |0155|Min Stack|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0155.Min-Stack)|46.9%|Easy|| |0156|Binary Tree Upside Down||56.7%|Medium|| -|0157|Read N Characters Given Read4||37.8%|Easy|| +|0157|Read N Characters Given Read4||37.9%|Easy|| |0158|Read N Characters Given Read4 II - Call multiple times||37.6%|Hard|| |0159|Longest Substring with At Most Two Distinct Characters||50.8%|Medium|| -|0160|Intersection of Two Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0160.Intersection-of-Two-Linked-Lists)|44.7%|Easy|| +|0160|Intersection of Two Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0160.Intersection-of-Two-Linked-Lists)|44.8%|Easy|| |0161|One Edit Distance||33.2%|Medium|| |0162|Find Peak Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0162.Find-Peak-Element)|44.1%|Medium|| |0163|Missing Ranges||27.6%|Easy|| |0164|Maximum Gap|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0164.Maximum-Gap)|37.2%|Hard|| -|0165|Compare Version Numbers||30.7%|Medium|| +|0165|Compare Version Numbers||30.8%|Medium|| |0166|Fraction to Recurring Decimal||22.5%|Medium|| |0167|Two Sum II - Input array is sorted|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0167.Two-Sum-II---Input-array-is-sorted)|55.8%|Easy|| |0168|Excel Sheet Column Title|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0168.Excel-Sheet-Column-Title)|32.0%|Easy|| |0169|Majority Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0169.Majority-Element)|60.3%|Easy|| |0170|Two Sum III - Data structure design||35.1%|Easy|| |0171|Excel Sheet Column Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0171.Excel-Sheet-Column-Number)|57.2%|Easy|| -|0172|Factorial Trailing Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0172.Factorial-Trailing-Zeroes)|38.8%|Easy|| +|0172|Factorial Trailing Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0172.Factorial-Trailing-Zeroes)|38.9%|Easy|| |0173|Binary Search Tree Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0173.Binary-Search-Tree-Iterator)|60.8%|Medium|| |0174|Dungeon Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0174.Dungeon-Game)|33.5%|Hard|| |0175|Combine Two Tables||65.0%|Easy|| @@ -318,18 +318,18 @@ |0177|Nth Highest Salary||33.7%|Medium|| |0178|Rank Scores||51.3%|Medium|| |0179|Largest Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0179.Largest-Number)|30.9%|Medium|| -|0180|Consecutive Numbers||42.7%|Medium|| +|0180|Consecutive Numbers||42.8%|Medium|| |0181|Employees Earning More Than Their Managers||61.3%|Easy|| |0182|Duplicate Emails||65.2%|Easy|| |0183|Customers Who Never Order||57.7%|Easy|| |0184|Department Highest Salary||41.1%|Medium|| |0185|Department Top Three Salaries||40.1%|Hard|| |0186|Reverse Words in a String II||46.2%|Medium|| -|0187|Repeated DNA Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0187.Repeated-DNA-Sequences)|41.7%|Medium|| +|0187|Repeated DNA Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0187.Repeated-DNA-Sequences)|41.8%|Medium|| |0188|Best Time to Buy and Sell Stock IV||30.2%|Hard|| |0189|Rotate Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0189.Rotate-Array)|36.8%|Medium|| |0190|Reverse Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0190.Reverse-Bits)|42.8%|Easy|| -|0191|Number of 1 Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0191.Number-of-1-Bits)|54.4%|Easy|| +|0191|Number of 1 Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0191.Number-of-1-Bits)|54.5%|Easy|| |0192|Word Frequency||25.5%|Medium|| |0193|Valid Phone Numbers||25.4%|Easy|| |0194|Transpose File||24.4%|Medium|| @@ -345,7 +345,7 @@ |0204|Count Primes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0204.Count-Primes)|32.4%|Easy|| |0205|Isomorphic Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0205.Isomorphic-Strings)|40.7%|Easy|| |0206|Reverse Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0206.Reverse-Linked-List)|65.9%|Easy|| -|0207|Course Schedule|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0207.Course-Schedule)|44.3%|Medium|| +|0207|Course Schedule|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0207.Course-Schedule)|44.4%|Medium|| |0208|Implement Trie (Prefix Tree)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0208.Implement-Trie-(Prefix-Tree))|52.8%|Medium|| |0209|Minimum Size Subarray Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0209.Minimum-Size-Subarray-Sum)|39.9%|Medium|| |0210|Course Schedule II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0210.Course-Schedule-II)|43.1%|Medium|| @@ -363,31 +363,31 @@ |0222|Count Complete Tree Nodes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0222.Count-Complete-Tree-Nodes)|49.9%|Medium|| |0223|Rectangle Area|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0223.Rectangle-Area)|38.4%|Medium|| |0224|Basic Calculator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0224.Basic-Calculator)|38.3%|Hard|| -|0225|Implement Stack using Queues|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0225.Implement-Stack-using-Queues)|48.0%|Easy|| +|0225|Implement Stack using Queues|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0225.Implement-Stack-using-Queues)|48.1%|Easy|| |0226|Invert Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0226.Invert-Binary-Tree)|67.5%|Easy|| |0227|Basic Calculator II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0227.Basic-Calculator-II)|38.9%|Medium|| |0228|Summary Ranges|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0228.Summary-Ranges)|42.8%|Easy|| |0229|Majority Element II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0229.Majority-Element-II)|39.1%|Medium|| |0230|Kth Smallest Element in a BST|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0230.Kth-Smallest-Element-in-a-BST)|63.1%|Medium|| |0231|Power of Two|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0231.Power-of-Two)|43.8%|Easy|| -|0232|Implement Queue using Stacks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0232.Implement-Queue-using-Stacks)|52.8%|Easy|| +|0232|Implement Queue using Stacks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0232.Implement-Queue-using-Stacks)|52.9%|Easy|| |0233|Number of Digit One||31.9%|Hard|| |0234|Palindrome Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0234.Palindrome-Linked-List)|42.2%|Easy|| |0235|Lowest Common Ancestor of a Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree)|52.3%|Easy|| |0236|Lowest Common Ancestor of a Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0236.Lowest-Common-Ancestor-of-a-Binary-Tree)|49.6%|Medium|| -|0237|Delete Node in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0237.Delete-Node-in-a-Linked-List)|67.6%|Easy|| +|0237|Delete Node in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0237.Delete-Node-in-a-Linked-List)|67.7%|Easy|| |0238|Product of Array Except Self||61.4%|Medium|| |0239|Sliding Window Maximum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0239.Sliding-Window-Maximum)|44.8%|Hard|| |0240|Search a 2D Matrix II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0240.Search-a-2D-Matrix-II)|45.5%|Medium|| |0241|Different Ways to Add Parentheses||57.7%|Medium|| |0242|Valid Anagram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0242.Valid-Anagram)|59.0%|Easy|| |0243|Shortest Word Distance||62.2%|Easy|| -|0244|Shortest Word Distance II||54.7%|Medium|| +|0244|Shortest Word Distance II||54.8%|Medium|| |0245|Shortest Word Distance III||56.2%|Medium|| |0246|Strobogrammatic Number||46.5%|Easy|| |0247|Strobogrammatic Number II||48.9%|Medium|| |0248|Strobogrammatic Number III||40.4%|Hard|| -|0249|Group Shifted Strings||58.6%|Medium|| +|0249|Group Shifted Strings||58.7%|Medium|| |0250|Count Univalue Subtrees||53.6%|Medium|| |0251|Flatten 2D Vector||46.5%|Medium|| |0252|Meeting Rooms||55.6%|Easy|| @@ -395,14 +395,14 @@ |0254|Factor Combinations||47.6%|Medium|| |0255|Verify Preorder Sequence in Binary Search Tree||46.5%|Medium|| |0256|Paint House||54.1%|Medium|| -|0257|Binary Tree Paths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0257.Binary-Tree-Paths)|54.2%|Easy|| +|0257|Binary Tree Paths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0257.Binary-Tree-Paths)|54.3%|Easy|| |0258|Add Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0258.Add-Digits)|58.8%|Easy|| |0259|3Sum Smaller||49.3%|Medium|| |0260|Single Number III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0260.Single-Number-III)|65.5%|Medium|| |0261|Graph Valid Tree||43.4%|Medium|| |0262|Trips and Users||35.7%|Hard|| |0263|Ugly Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0263.Ugly-Number)|41.7%|Easy|| -|0264|Ugly Number II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0264.Ugly-Number-II)|43.0%|Medium|| +|0264|Ugly Number II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0264.Ugly-Number-II)|43.1%|Medium|| |0265|Paint House II||46.1%|Hard|| |0266|Palindrome Permutation||62.9%|Easy|| |0267|Palindrome Permutation II||37.7%|Medium|| @@ -436,14 +436,14 @@ |0295|Find Median from Data Stream||47.6%|Hard|| |0296|Best Meeting Point||58.2%|Hard|| |0297|Serialize and Deserialize Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0297.Serialize-and-Deserialize-Binary-Tree)|50.4%|Hard|| -|0298|Binary Tree Longest Consecutive Sequence||48.2%|Medium|| +|0298|Binary Tree Longest Consecutive Sequence||48.3%|Medium|| |0299|Bulls and Cows||44.8%|Medium|| |0300|Longest Increasing Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0300.Longest-Increasing-Subsequence)|44.7%|Medium|| |0301|Remove Invalid Parentheses||45.0%|Hard|| |0302|Smallest Rectangle Enclosing Black Pixels||52.8%|Hard|| |0303|Range Sum Query - Immutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0303.Range-Sum-Query---Immutable)|48.5%|Easy|| |0304|Range Sum Query 2D - Immutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0304.Range-Sum-Query-2D---Immutable)|41.4%|Medium|| -|0305|Number of Islands II||39.6%|Hard|| +|0305|Number of Islands II||39.5%|Hard|| |0306|Additive Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0306.Additive-Number)|29.8%|Medium|| |0307|Range Sum Query - Mutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0307.Range-Sum-Query---Mutable)|37.1%|Medium|| |0308|Range Sum Query 2D - Mutable||38.4%|Hard|| @@ -455,8 +455,8 @@ |0314|Binary Tree Vertical Order Traversal||47.4%|Medium|| |0315|Count of Smaller Numbers After Self|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0315.Count-of-Smaller-Numbers-After-Self)|42.4%|Hard|| |0316|Remove Duplicate Letters||39.5%|Medium|| -|0317|Shortest Distance from All Buildings||43.0%|Hard|| -|0318|Maximum Product of Word Lengths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0318.Maximum-Product-of-Word-Lengths)|52.5%|Medium|| +|0317|Shortest Distance from All Buildings||43.1%|Hard|| +|0318|Maximum Product of Word Lengths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0318.Maximum-Product-of-Word-Lengths)|52.6%|Medium|| |0319|Bulb Switcher||45.5%|Medium|| |0320|Generalized Abbreviation||54.1%|Medium|| |0321|Create Maximum Number||27.6%|Hard|| @@ -464,7 +464,7 @@ |0323|Number of Connected Components in an Undirected Graph||58.4%|Medium|| |0324|Wiggle Sort II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0324.Wiggle-Sort-II)|30.9%|Medium|| |0325|Maximum Size Subarray Sum Equals k||47.6%|Medium|| -|0326|Power of Three|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0326.Power-of-Three)|42.1%|Easy|| +|0326|Power of Three|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0326.Power-of-Three)|42.3%|Easy|| |0327|Count of Range Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0327.Count-of-Range-Sum)|36.4%|Hard|| |0328|Odd Even Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0328.Odd-Even-Linked-List)|57.3%|Medium|| |0329|Longest Increasing Path in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0329.Longest-Increasing-Path-in-a-Matrix)|46.4%|Hard|| @@ -476,24 +476,24 @@ |0335|Self Crossing||28.8%|Hard|| |0336|Palindrome Pairs||35.0%|Hard|| |0337|House Robber III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0337.House-Robber-III)|52.0%|Medium|| -|0338|Counting Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0338.Counting-Bits)|70.6%|Medium|| +|0338|Counting Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0338.Counting-Bits)|70.7%|Medium|| |0339|Nested List Weight Sum||77.0%|Medium|| |0340|Longest Substring with At Most K Distinct Characters||45.8%|Medium|| -|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|55.9%|Medium|| +|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|56.0%|Medium|| |0342|Power of Four|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0342.Power-of-Four)|41.9%|Easy|| |0343|Integer Break|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0343.Integer-Break)|51.4%|Medium|| |0344|Reverse String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0344.Reverse-String)|70.8%|Easy|| |0345|Reverse Vowels of a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0345.Reverse-Vowels-of-a-String)|45.3%|Easy|| -|0346|Moving Average from Data Stream||73.7%|Easy|| +|0346|Moving Average from Data Stream||73.8%|Easy|| |0347|Top K Frequent Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0347.Top-K-Frequent-Elements)|62.7%|Medium|| |0348|Design Tic-Tac-Toe||55.8%|Medium|| |0349|Intersection of Two Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0349.Intersection-of-Two-Arrays)|65.5%|Easy|| |0350|Intersection of Two Arrays II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0350.Intersection-of-Two-Arrays-II)|52.2%|Easy|| |0351|Android Unlock Patterns||49.9%|Medium|| -|0352|Data Stream as Disjoint Intervals||48.8%|Hard|| +|0352|Data Stream as Disjoint Intervals||48.9%|Hard|| |0353|Design Snake Game||36.3%|Medium|| |0354|Russian Doll Envelopes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0354.Russian-Doll-Envelopes)|37.8%|Hard|| -|0355|Design Twitter||31.7%|Medium|| +|0355|Design Twitter||31.8%|Medium|| |0356|Line Reflection||33.1%|Medium|| |0357|Count Numbers with Unique Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0357.Count-Numbers-with-Unique-Digits)|49.0%|Medium|| |0358|Rearrange String k Distance Apart||35.8%|Hard|| @@ -505,7 +505,7 @@ |0364|Nested List Weight Sum II||64.1%|Medium|| |0365|Water and Jug Problem||31.4%|Medium|| |0366|Find Leaves of Binary Tree||72.3%|Medium|| -|0367|Valid Perfect Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0367.Valid-Perfect-Square)|42.2%|Easy|| +|0367|Valid Perfect Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0367.Valid-Perfect-Square)|42.3%|Easy|| |0368|Largest Divisible Subset|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0368.Largest-Divisible-Subset)|38.5%|Medium|| |0369|Plus One Linked List||59.6%|Medium|| |0370|Range Addition||63.8%|Medium|| @@ -513,7 +513,7 @@ |0372|Super Pow|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0372.Super-Pow)|36.8%|Medium|| |0373|Find K Pairs with Smallest Sums|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0373.Find-K-Pairs-with-Smallest-Sums)|38.1%|Medium|| |0374|Guess Number Higher or Lower||45.2%|Easy|| -|0375|Guess Number Higher or Lower II||42.5%|Medium|| +|0375|Guess Number Higher or Lower II||42.6%|Medium|| |0376|Wiggle Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0376.Wiggle-Subsequence)|42.3%|Medium|| |0377|Combination Sum IV|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0377.Combination-Sum-IV)|47.1%|Medium|| |0378|Kth Smallest Element in a Sorted Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0378.Kth-Smallest-Element-in-a-Sorted-Matrix)|56.6%|Medium|| @@ -525,7 +525,7 @@ |0384|Shuffle an Array||54.2%|Medium|| |0385|Mini Parser|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0385.Mini-Parser)|34.7%|Medium|| |0386|Lexicographical Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0386.Lexicographical-Numbers)|54.8%|Medium|| -|0387|First Unique Character in a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0387.First-Unique-Character-in-a-String)|54.0%|Easy|| +|0387|First Unique Character in a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0387.First-Unique-Character-in-a-String)|54.1%|Easy|| |0388|Longest Absolute File Path||43.3%|Medium|| |0389|Find the Difference|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0389.Find-the-Difference)|58.0%|Easy|| |0390|Elimination Game||45.3%|Medium|| @@ -539,7 +539,7 @@ |0398|Random Pick Index||58.6%|Medium|| |0399|Evaluate Division|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0399.Evaluate-Division)|54.7%|Medium|| |0400|Nth Digit||32.5%|Medium|| -|0401|Binary Watch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0401.Binary-Watch)|48.6%|Easy|| +|0401|Binary Watch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0401.Binary-Watch)|48.7%|Easy|| |0402|Remove K Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0402.Remove-K-Digits)|28.7%|Medium|| |0403|Frog Jump||41.8%|Hard|| |0404|Sum of Left Leaves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0404.Sum-of-Left-Leaves)|52.4%|Easy|| @@ -580,25 +580,25 @@ |0439|Ternary Expression Parser||56.9%|Medium|| |0440|K-th Smallest in Lexicographical Order||29.9%|Hard|| |0441|Arranging Coins|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0441.Arranging-Coins)|42.7%|Easy|| -|0442|Find All Duplicates in an Array||69.2%|Medium|| +|0442|Find All Duplicates in an Array||69.3%|Medium|| |0443|String Compression||44.3%|Medium|| |0444|Sequence Reconstruction||23.7%|Medium|| -|0445|Add Two Numbers II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0445.Add-Two-Numbers-II)|56.6%|Medium|| +|0445|Add Two Numbers II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0445.Add-Two-Numbers-II)|56.7%|Medium|| |0446|Arithmetic Slices II - Subsequence||33.7%|Hard|| |0447|Number of Boomerangs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0447.Number-of-Boomerangs)|52.6%|Medium|| -|0448|Find All Numbers Disappeared in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0448.Find-All-Numbers-Disappeared-in-an-Array)|56.2%|Easy|| +|0448|Find All Numbers Disappeared in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0448.Find-All-Numbers-Disappeared-in-an-Array)|56.3%|Easy|| |0449|Serialize and Deserialize BST||54.4%|Medium|| |0450|Delete Node in a BST||45.6%|Medium|| |0451|Sort Characters By Frequency|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0451.Sort-Characters-By-Frequency)|64.7%|Medium|| |0452|Minimum Number of Arrows to Burst Balloons||49.8%|Medium|| -|0453|Minimum Moves to Equal Array Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0453.Minimum-Moves-to-Equal-Array-Elements)|51.0%|Easy|| +|0453|Minimum Moves to Equal Array Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0453.Minimum-Moves-to-Equal-Array-Elements)|51.1%|Easy|| |0454|4Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0454.4Sum-II)|54.7%|Medium|| |0455|Assign Cookies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0455.Assign-Cookies)|50.4%|Easy|| |0456|132 Pattern|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0456.132-Pattern)|30.7%|Medium|| |0457|Circular Array Loop|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0457.Circular-Array-Loop)|30.4%|Medium|| |0458|Poor Pigs||54.6%|Hard|| |0459|Repeated Substring Pattern||43.3%|Easy|| -|0460|LFU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0460.LFU-Cache)|36.6%|Hard|| +|0460|LFU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0460.LFU-Cache)|36.7%|Hard|| |0461|Hamming Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0461.Hamming-Distance)|73.3%|Easy|| |0462|Minimum Moves to Equal Array Elements II||54.5%|Medium|| |0463|Island Perimeter|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0463.Island-Perimeter)|66.9%|Easy|| @@ -606,13 +606,13 @@ |0465|Optimal Account Balancing||48.6%|Hard|| |0466|Count The Repetitions||28.7%|Hard|| |0467|Unique Substrings in Wraparound String||36.2%|Medium|| -|0468|Validate IP Address||25.1%|Medium|| +|0468|Validate IP Address||25.2%|Medium|| |0469|Convex Polygon||37.6%|Medium|| |0470|Implement Rand10() Using Rand7()|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0470.Implement-Rand10()-Using-Rand7())|46.1%|Medium|| |0471|Encode String with Shortest Length||49.8%|Hard|| |0472|Concatenated Words||43.6%|Hard|| |0473|Matchsticks to Square||38.3%|Medium|| -|0474|Ones and Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0474.Ones-and-Zeroes)|43.6%|Medium|| +|0474|Ones and Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0474.Ones-and-Zeroes)|43.5%|Medium|| |0475|Heaters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0475.Heaters)|33.8%|Medium|| |0476|Number Complement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0476.Number-Complement)|65.2%|Easy|| |0477|Total Hamming Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0477.Total-Hamming-Distance)|50.7%|Medium|| @@ -633,12 +633,12 @@ |0492|Construct the Rectangle||50.7%|Easy|| |0493|Reverse Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0493.Reverse-Pairs)|27.3%|Hard|| |0494|Target Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0494.Target-Sum)|45.6%|Medium|| -|0495|Teemo Attacking||56.1%|Medium|| +|0495|Teemo Attacking||56.0%|Medium|| |0496|Next Greater Element I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0496.Next-Greater-Element-I)|66.0%|Easy|| |0497|Random Point in Non-overlapping Rectangles|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0497.Random-Point-in-Non-overlapping-Rectangles)|39.1%|Medium|| -|0498|Diagonal Traverse|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0498.Diagonal-Traverse)|50.6%|Medium|| +|0498|Diagonal Traverse|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0498.Diagonal-Traverse)|50.7%|Medium|| |0499|The Maze III||42.7%|Hard|| -|0500|Keyboard Row|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0500.Keyboard-Row)|65.9%|Easy|| +|0500|Keyboard Row|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0500.Keyboard-Row)|66.0%|Easy|| |0501|Find Mode in Binary Search Tree||43.9%|Easy|| |0502|IPO||41.9%|Hard|| |0503|Next Greater Element II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0503.Next-Greater-Element-II)|58.9%|Medium|| @@ -650,11 +650,11 @@ |0509|Fibonacci Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0509.Fibonacci-Number)|67.9%|Easy|| |0510|Inorder Successor in BST II||60.5%|Medium|| |0511|Game Play Analysis I||81.5%|Easy|| -|0512|Game Play Analysis II||56.1%|Easy|| +|0512|Game Play Analysis II||56.0%|Easy|| |0513|Find Bottom Left Tree Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0513.Find-Bottom-Left-Tree-Value)|62.9%|Medium|| |0514|Freedom Trail||45.0%|Hard|| |0515|Find Largest Value in Each Tree Row|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0515.Find-Largest-Value-in-Each-Tree-Row)|62.5%|Medium|| -|0516|Longest Palindromic Subsequence||55.9%|Medium|| +|0516|Longest Palindromic Subsequence||56.0%|Medium|| |0517|Super Washing Machines||38.7%|Hard|| |0518|Coin Change 2||52.2%|Medium|| |0519|Random Flip Matrix||37.9%|Medium|| @@ -663,7 +663,7 @@ |0522|Longest Uncommon Subsequence II||34.3%|Medium|| |0523|Continuous Subarray Sum||24.9%|Medium|| |0524|Longest Word in Dictionary through Deleting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0524.Longest-Word-in-Dictionary-through-Deleting)|50.2%|Medium|| -|0525|Contiguous Array||43.6%|Medium|| +|0525|Contiguous Array||43.7%|Medium|| |0526|Beautiful Arrangement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0526.Beautiful-Arrangement)|62.2%|Medium|| |0527|Word Abbreviation||56.5%|Hard|| |0528|Random Pick with Weight|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0528.Random-Pick-with-Weight)|44.8%|Medium|| @@ -672,13 +672,13 @@ |0531|Lonely Pixel I||59.8%|Medium|| |0532|K-diff Pairs in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0532.K-diff-Pairs-in-an-Array)|35.6%|Medium|| |0533|Lonely Pixel II||48.2%|Medium|| -|0534|Game Play Analysis III||80.0%|Medium|| +|0534|Game Play Analysis III||80.1%|Medium|| |0535|Encode and Decode TinyURL|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0535.Encode-and-Decode-TinyURL)|82.4%|Medium|| -|0536|Construct Binary Tree from String||52.3%|Medium|| -|0537|Complex Number Multiplication|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0537.Complex-Number-Multiplication)|68.5%|Medium|| +|0536|Construct Binary Tree from String||52.4%|Medium|| +|0537|Complex Number Multiplication|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0537.Complex-Number-Multiplication)|68.4%|Medium|| |0538|Convert BST to Greater Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0538.Convert-BST-to-Greater-Tree)|60.0%|Medium|| |0539|Minimum Time Difference||52.5%|Medium|| -|0540|Single Element in a Sorted Array||57.9%|Medium|| +|0540|Single Element in a Sorted Array||58.0%|Medium|| |0541|Reverse String II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0541.Reverse-String-II)|49.6%|Easy|| |0542|01 Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0542.01-Matrix)|41.2%|Medium|| |0543|Diameter of Binary Tree||49.7%|Easy|| @@ -686,18 +686,18 @@ |0545|Boundary of Binary Tree||40.5%|Medium|| |0546|Remove Boxes||44.1%|Hard|| |0547|Number of Provinces|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0547.Number-of-Provinces)|60.9%|Medium|| -|0548|Split Array with Equal Sum||48.4%|Medium|| +|0548|Split Array with Equal Sum||48.5%|Medium|| |0549|Binary Tree Longest Consecutive Sequence II||47.3%|Medium|| |0550|Game Play Analysis IV||45.8%|Medium|| |0551|Student Attendance Record I||46.2%|Easy|| -|0552|Student Attendance Record II||37.8%|Hard|| +|0552|Student Attendance Record II||37.9%|Hard|| |0553|Optimal Division||57.6%|Medium|| |0554|Brick Wall||51.6%|Medium|| |0555|Split Concatenated Strings||42.9%|Medium|| |0556|Next Greater Element III||33.5%|Medium|| -|0557|Reverse Words in a String III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0557.Reverse-Words-in-a-String-III)|72.5%|Easy|| +|0557|Reverse Words in a String III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0557.Reverse-Words-in-a-String-III)|72.6%|Easy|| |0558|Logical OR of Two Binary Grids Represented as Quad-Trees||45.8%|Medium|| -|0559|Maximum Depth of N-ary Tree||69.6%|Easy|| +|0559|Maximum Depth of N-ary Tree||69.7%|Easy|| |0560|Subarray Sum Equals K||43.7%|Medium|| |0561|Array Partition I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0561.Array-Partition-I)|73.6%|Easy|| |0562|Longest Line of Consecutive One in Matrix||46.3%|Medium|| @@ -714,7 +714,7 @@ |0573|Squirrel Simulation||54.2%|Medium|| |0574|Winning Candidate||52.9%|Medium|| |0575|Distribute Candies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0575.Distribute-Candies)|64.4%|Easy|| -|0576|Out of Boundary Paths||36.2%|Medium|| +|0576|Out of Boundary Paths||36.1%|Medium|| |0577|Employee Bonus||72.1%|Easy|| |0578|Get Highest Answer Rate Question||42.2%|Medium|| |0579|Find Cumulative Salary of an Employee||38.6%|Hard|| @@ -740,7 +740,7 @@ |0599|Minimum Index Sum of Two Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0599.Minimum-Index-Sum-of-Two-Lists)|52.0%|Easy|| |0600|Non-negative Integers without Consecutive Ones||34.4%|Hard|| |0601|Human Traffic of Stadium||46.0%|Hard|| -|0602|Friend Requests II: Who Has the Most Friends||58.0%|Medium|| +|0602|Friend Requests II: Who Has the Most Friends||58.1%|Medium|| |0603|Consecutive Available Seats||66.3%|Easy|| |0604|Design Compressed String Iterator||38.3%|Easy|| |0605|Can Place Flowers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0605.Can-Place-Flowers)|31.7%|Easy|| @@ -748,7 +748,7 @@ |0607|Sales Person||65.6%|Easy|| |0608|Tree Node||70.1%|Medium|| |0609|Find Duplicate File in System||61.3%|Medium|| -|0610|Triangle Judgement||69.0%|Easy|| +|0610|Triangle Judgement||69.1%|Easy|| |0611|Valid Triangle Number||49.5%|Medium|| |0612|Shortest Distance in a Plane||61.8%|Medium|| |0613|Shortest Distance in a Line||80.0%|Easy|| @@ -757,9 +757,9 @@ |0616|Add Bold Tag in String||45.0%|Medium|| |0617|Merge Two Binary Trees||75.6%|Easy|| |0618|Students Report By Geography||60.8%|Hard|| -|0619|Biggest Single Number||45.3%|Easy|| +|0619|Biggest Single Number||45.4%|Easy|| |0620|Not Boring Movies||70.3%|Easy|| -|0621|Task Scheduler||52.3%|Medium|| +|0621|Task Scheduler||52.4%|Medium|| |0622|Design Circular Queue|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0622.Design-Circular-Queue)|47.7%|Medium|| |0623|Add One Row to Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0623.Add-One-Row-to-Tree)|53.0%|Medium|| |0624|Maximum Distance in Arrays||39.7%|Medium|| @@ -773,14 +773,14 @@ |0632|Smallest Range Covering Elements from K Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0632.Smallest-Range-Covering-Elements-from-K-Lists)|54.7%|Hard|| |0633|Sum of Square Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0633.Sum-of-Square-Numbers)|32.7%|Medium|| |0634|Find the Derangement of An Array||40.6%|Medium|| -|0635|Design Log Storage System||60.2%|Medium|| +|0635|Design Log Storage System||60.3%|Medium|| |0636|Exclusive Time of Functions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0636.Exclusive-Time-of-Functions)|55.2%|Medium|| |0637|Average of Levels in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0637.Average-of-Levels-in-Binary-Tree)|66.2%|Easy|| |0638|Shopping Offers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0638.Shopping-Offers)|53.3%|Medium|| |0639|Decode Ways II||27.7%|Hard|| |0640|Solve the Equation||42.8%|Medium|| |0641|Design Circular Deque||56.4%|Medium|| -|0642|Design Search Autocomplete System||46.6%|Hard|| +|0642|Design Search Autocomplete System||46.7%|Hard|| |0643|Maximum Average Subarray I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0643.Maximum-Average-Subarray-I)|42.1%|Easy|| |0644|Maximum Average Subarray II||34.3%|Hard|| |0645|Set Mismatch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0645.Set-Mismatch)|41.0%|Easy|| @@ -809,7 +809,7 @@ |0668|Kth Smallest Number in Multiplication Table|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0668.Kth-Smallest-Number-in-Multiplication-Table)|48.0%|Hard|| |0669|Trim a Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0669.Trim-a-Binary-Search-Tree)|64.3%|Medium|| |0670|Maximum Swap||45.4%|Medium|| -|0671|Second Minimum Node In a Binary Tree||42.8%|Easy|| +|0671|Second Minimum Node In a Binary Tree||42.9%|Easy|| |0672|Bulb Switcher II||51.1%|Medium|| |0673|Number of Longest Increasing Subsequence||38.7%|Medium|| |0674|Longest Continuous Increasing Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0674.Longest-Continuous-Increasing-Subsequence)|46.0%|Easy|| @@ -821,7 +821,7 @@ |0680|Valid Palindrome II||37.2%|Easy|| |0681|Next Closest Time||46.0%|Medium|| |0682|Baseball Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0682.Baseball-Game)|67.5%|Easy|| -|0683|K Empty Slots||36.1%|Hard|| +|0683|K Empty Slots||36.2%|Hard|| |0684|Redundant Connection|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0684.Redundant-Connection)|59.2%|Medium|| |0685|Redundant Connection II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0685.Redundant-Connection-II)|33.2%|Hard|| |0686|Repeated String Match||32.9%|Medium|| @@ -836,7 +836,7 @@ |0695|Max Area of Island|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0695.Max-Area-of-Island)|65.3%|Medium|| |0696|Count Binary Substrings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0696.Count-Binary-Substrings)|61.2%|Easy|| |0697|Degree of an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0697.Degree-of-an-Array)|54.5%|Easy|| -|0698|Partition to K Equal Sum Subsets||45.6%|Medium|| +|0698|Partition to K Equal Sum Subsets||45.5%|Medium|| |0699|Falling Squares|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0699.Falling-Squares)|43.4%|Hard|| |0700|Search in a Binary Search Tree||73.5%|Easy|| |0701|Insert into a Binary Search Tree||75.3%|Medium|| @@ -862,17 +862,17 @@ |0721|Accounts Merge|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0721.Accounts-Merge)|52.5%|Medium|| |0722|Remove Comments||36.5%|Medium|| |0723|Candy Crush||73.2%|Medium|| -|0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|46.3%|Easy|| +|0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|46.4%|Easy|| |0725|Split Linked List in Parts|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0725.Split-Linked-List-in-Parts)|53.2%|Medium|| |0726|Number of Atoms|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0726.Number-of-Atoms)|51.0%|Hard|| |0727|Minimum Window Subsequence||42.5%|Hard|| -|0728|Self Dividing Numbers||75.7%|Easy|| +|0728|Self Dividing Numbers||75.8%|Easy|| |0729|My Calendar I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0729.My-Calendar-I)|53.7%|Medium|| |0730|Count Different Palindromic Subsequences||43.5%|Hard|| |0731|My Calendar II||51.1%|Medium|| |0732|My Calendar III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0732.My-Calendar-III)|62.5%|Hard|| |0733|Flood Fill|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0733.Flood-Fill)|56.0%|Easy|| -|0734|Sentence Similarity||42.4%|Easy|| +|0734|Sentence Similarity||42.5%|Easy|| |0735|Asteroid Collision|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0735.Asteroid-Collision)|43.4%|Medium|| |0736|Parse Lisp Expression||49.8%|Hard|| |0737|Sentence Similarity II||46.7%|Medium|| @@ -892,7 +892,7 @@ |0751|IP to CIDR||59.0%|Medium|| |0752|Open the Lock||53.0%|Medium|| |0753|Cracking the Safe|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0753.Cracking-the-Safe)|52.7%|Hard|| -|0754|Reach a Number||40.5%|Medium|| +|0754|Reach a Number||40.6%|Medium|| |0755|Pour Water||44.3%|Medium|| |0756|Pyramid Transition Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0756.Pyramid-Transition-Matrix)|55.7%|Medium|| |0757|Set Intersection Size At Least Two||42.6%|Hard|| @@ -908,7 +908,7 @@ |0767|Reorganize String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0767.Reorganize-String)|50.3%|Medium|| |0768|Max Chunks To Make Sorted II||50.0%|Hard|| |0769|Max Chunks To Make Sorted||56.0%|Medium|| -|0770|Basic Calculator IV||54.4%|Hard|| +|0770|Basic Calculator IV||54.5%|Hard|| |0771|Jewels and Stones|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0771.Jewels-and-Stones)|87.0%|Easy|| |0772|Basic Calculator III||44.3%|Hard|| |0773|Sliding Puzzle||61.3%|Hard|| @@ -916,24 +916,24 @@ |0775|Global and Local Inversions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0775.Global-and-Local-Inversions)|46.2%|Medium|| |0776|Split BST||56.7%|Medium|| |0777|Swap Adjacent in LR String||35.7%|Medium|| -|0778|Swim in Rising Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0778.Swim-in-Rising-Water)|55.0%|Hard|| -|0779|K-th Symbol in Grammar||38.8%|Medium|| +|0778|Swim in Rising Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0778.Swim-in-Rising-Water)|55.1%|Hard|| +|0779|K-th Symbol in Grammar||38.9%|Medium|| |0780|Reaching Points||30.5%|Hard|| |0781|Rabbits in Forest|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0781.Rabbits-in-Forest)|55.8%|Medium|| -|0782|Transform to Chessboard||47.1%|Hard|| +|0782|Transform to Chessboard||47.0%|Hard|| |0783|Minimum Distance Between BST Nodes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0783.Minimum-Distance-Between-BST-Nodes)|54.3%|Easy|| |0784|Letter Case Permutation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0784.Letter-Case-Permutation)|68.9%|Medium|| |0785|Is Graph Bipartite?|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0785.Is-Graph-Bipartite?)|48.8%|Medium|| -|0786|K-th Smallest Prime Fraction|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0786.K-th-Smallest-Prime-Fraction)|43.6%|Hard|| +|0786|K-th Smallest Prime Fraction|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0786.K-th-Smallest-Prime-Fraction)|43.7%|Hard|| |0787|Cheapest Flights Within K Stops||39.7%|Medium|| -|0788|Rotated Digits||57.5%|Easy|| +|0788|Rotated Digits||57.6%|Easy|| |0789|Escape The Ghosts||58.6%|Medium|| |0790|Domino and Tromino Tiling||40.3%|Medium|| |0791|Custom Sort String||65.9%|Medium|| |0792|Number of Matching Subsequences||48.4%|Medium|| -|0793|Preimage Size of Factorial Zeroes Function|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0793.Preimage-Size-of-Factorial-Zeroes-Function)|40.6%|Hard|| +|0793|Preimage Size of Factorial Zeroes Function|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0793.Preimage-Size-of-Factorial-Zeroes-Function)|40.7%|Hard|| |0794|Valid Tic-Tac-Toe State||34.1%|Medium|| -|0795|Number of Subarrays with Bounded Maximum||48.0%|Medium|| +|0795|Number of Subarrays with Bounded Maximum||48.1%|Medium|| |0796|Rotate String||49.1%|Easy|| |0797|All Paths From Source to Target||78.7%|Medium|| |0798|Smallest Rotation with Highest Score||45.2%|Hard|| @@ -943,7 +943,7 @@ |0802|Find Eventual Safe States|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0802.Find-Eventual-Safe-States)|50.1%|Medium|| |0803|Bricks Falling When Hit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0803.Bricks-Falling-When-Hit)|32.0%|Hard|| |0804|Unique Morse Code Words||79.1%|Easy|| -|0805|Split Array With Same Average||26.9%|Hard|| +|0805|Split Array With Same Average||27.0%|Hard|| |0806|Number of Lines To Write String||65.5%|Easy|| |0807|Max Increase to Keep City Skyline||84.5%|Medium|| |0808|Soup Servings||41.2%|Medium|| @@ -952,13 +952,13 @@ |0811|Subdomain Visit Count|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0811.Subdomain-Visit-Count)|71.8%|Easy|| |0812|Largest Triangle Area|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0812.Largest-Triangle-Area)|59.1%|Easy|| |0813|Largest Sum of Averages||51.3%|Medium|| -|0814|Binary Tree Pruning||72.0%|Medium|| +|0814|Binary Tree Pruning||71.9%|Medium|| |0815|Bus Routes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0815.Bus-Routes)|43.6%|Hard|| |0816|Ambiguous Coordinates||48.2%|Medium|| |0817|Linked List Components|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0817.Linked-List-Components)|57.8%|Medium|| |0818|Race Car||40.5%|Hard|| |0819|Most Common Word|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0819.Most-Common-Word)|45.5%|Easy|| -|0820|Short Encoding of Words|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0820.Short-Encoding-of-Words)|55.0%|Medium|| +|0820|Short Encoding of Words|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0820.Short-Encoding-of-Words)|54.9%|Medium|| |0821|Shortest Distance to a Character|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0821.Shortest-Distance-to-a-Character)|70.1%|Easy|| |0822|Card Flipping Game||43.8%|Medium|| |0823|Binary Trees With Factors|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0823.Binary-Trees-With-Factors)|43.7%|Medium|| @@ -972,7 +972,7 @@ |0831|Masking Personal Information||44.8%|Medium|| |0832|Flipping an Image|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0832.Flipping-an-Image)|78.4%|Easy|| |0833|Find And Replace in String||51.5%|Medium|| -|0834|Sum of Distances in Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0834.Sum-of-Distances-in-Tree)|46.7%|Hard|| +|0834|Sum of Distances in Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0834.Sum-of-Distances-in-Tree)|46.8%|Hard|| |0835|Image Overlap||61.6%|Medium|| |0836|Rectangle Overlap|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0836.Rectangle-Overlap)|43.5%|Easy|| |0837|New 21 Game||35.6%|Medium|| @@ -991,24 +991,24 @@ |0850|Rectangle Area II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0850.Rectangle-Area-II)|48.5%|Hard|| |0851|Loud and Rich|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0851.Loud-and-Rich)|52.9%|Medium|| |0852|Peak Index in a Mountain Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0852.Peak-Index-in-a-Mountain-Array)|71.8%|Easy|| -|0853|Car Fleet|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0853.Car-Fleet)|44.5%|Medium|| -|0854|K-Similar Strings||38.8%|Hard|| +|0853|Car Fleet|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0853.Car-Fleet)|44.6%|Medium|| +|0854|K-Similar Strings||38.7%|Hard|| |0855|Exam Room||43.5%|Medium|| |0856|Score of Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0856.Score-of-Parentheses)|64.9%|Medium|| |0857|Minimum Cost to Hire K Workers||50.6%|Hard|| |0858|Mirror Reflection||59.6%|Medium|| -|0859|Buddy Strings||29.1%|Easy|| +|0859|Buddy Strings||29.0%|Easy|| |0860|Lemonade Change||51.9%|Easy|| |0861|Score After Flipping Matrix||73.8%|Medium|| |0862|Shortest Subarray with Sum at Least K|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0862.Shortest-Subarray-with-Sum-at-Least-K)|25.3%|Hard|| -|0863|All Nodes Distance K in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0863.All-Nodes-Distance-K-in-Binary-Tree)|58.2%|Medium|| -|0864|Shortest Path to Get All Keys|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0864.Shortest-Path-to-Get-All-Keys)|42.4%|Hard|| -|0865|Smallest Subtree with all the Deepest Nodes||65.1%|Medium|| +|0863|All Nodes Distance K in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0863.All-Nodes-Distance-K-in-Binary-Tree)|58.3%|Medium|| +|0864|Shortest Path to Get All Keys|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0864.Shortest-Path-to-Get-All-Keys)|42.5%|Hard|| +|0865|Smallest Subtree with all the Deepest Nodes||65.2%|Medium|| |0866|Prime Palindrome||25.0%|Medium|| |0867|Transpose Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0867.Transpose-Matrix)|61.9%|Easy|| |0868|Binary Gap||61.0%|Easy|| -|0869|Reordered Power of 2|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0869.Reordered-Power-of-2)|61.3%|Medium|| -|0870|Advantage Shuffle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0870.Advantage-Shuffle)|50.7%|Medium|| +|0869|Reordered Power of 2|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0869.Reordered-Power-of-2)|61.2%|Medium|| +|0870|Advantage Shuffle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0870.Advantage-Shuffle)|50.8%|Medium|| |0871|Minimum Number of Refueling Stops||32.5%|Hard|| |0872|Leaf-Similar Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0872.Leaf-Similar-Trees)|64.5%|Easy|| |0873|Length of Longest Fibonacci Subsequence||48.2%|Medium|| @@ -1032,7 +1032,7 @@ |0891|Sum of Subsequence Widths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0891.Sum-of-Subsequence-Widths)|33.2%|Hard|| |0892|Surface Area of 3D Shapes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0892.Surface-Area-of-3D-Shapes)|60.0%|Easy|| |0893|Groups of Special-Equivalent Strings||69.7%|Easy|| -|0894|All Possible Full Binary Trees||77.4%|Medium|| +|0894|All Possible Full Binary Trees||77.5%|Medium|| |0895|Maximum Frequency Stack|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0895.Maximum-Frequency-Stack)|63.3%|Hard|| |0896|Monotonic Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0896.Monotonic-Array)|57.9%|Easy|| |0897|Increasing Order Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0897.Increasing-Order-Search-Tree)|74.7%|Easy|| @@ -1041,7 +1041,7 @@ |0900|RLE Iterator||55.8%|Medium|| |0901|Online Stock Span|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0901.Online-Stock-Span)|61.5%|Medium|| |0902|Numbers At Most N Given Digit Set||36.1%|Hard|| -|0903|Valid Permutations for DI Sequence||54.3%|Hard|| +|0903|Valid Permutations for DI Sequence||54.4%|Hard|| |0904|Fruit Into Baskets|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0904.Fruit-Into-Baskets)|43.0%|Medium|| |0905|Sort Array By Parity||75.0%|Easy|| |0906|Super Palindromes||32.7%|Hard|| @@ -1055,28 +1055,28 @@ |0914|X of a Kind in a Deck of Cards|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0914.X-of-a-Kind-in-a-Deck-of-Cards)|33.9%|Easy|| |0915|Partition Array into Disjoint Intervals||46.5%|Medium|| |0916|Word Subsets|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0916.Word-Subsets)|52.8%|Medium|| -|0917|Reverse Only Letters||59.4%|Easy|| +|0917|Reverse Only Letters||59.5%|Easy|| |0918|Maximum Sum Circular Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0918.Maximum-Sum-Circular-Subarray)|34.4%|Medium|| -|0919|Complete Binary Tree Inserter||59.1%|Medium|| +|0919|Complete Binary Tree Inserter||59.2%|Medium|| |0920|Number of Music Playlists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0920.Number-of-Music-Playlists)|48.2%|Hard|| |0921|Minimum Add to Make Parentheses Valid|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0921.Minimum-Add-to-Make-Parentheses-Valid)|75.0%|Medium|| |0922|Sort Array By Parity II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0922.Sort-Array-By-Parity-II)|70.7%|Easy|| -|0923|3Sum With Multiplicity|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0923.3Sum-With-Multiplicity)|40.9%|Medium|| +|0923|3Sum With Multiplicity|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0923.3Sum-With-Multiplicity)|41.0%|Medium|| |0924|Minimize Malware Spread|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0924.Minimize-Malware-Spread)|41.9%|Hard|| -|0925|Long Pressed Name|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0925.Long-Pressed-Name)|37.2%|Easy|| +|0925|Long Pressed Name|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0925.Long-Pressed-Name)|37.1%|Easy|| |0926|Flip String to Monotone Increasing||53.4%|Medium|| -|0927|Three Equal Parts|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0927.Three-Equal-Parts)|34.6%|Hard|| +|0927|Three Equal Parts|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0927.Three-Equal-Parts)|34.7%|Hard|| |0928|Minimize Malware Spread II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0928.Minimize-Malware-Spread-II)|41.5%|Hard|| |0929|Unique Email Addresses||67.2%|Easy|| |0930|Binary Subarrays With Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0930.Binary-Subarrays-With-Sum)|44.9%|Medium|| |0931|Minimum Falling Path Sum||63.9%|Medium|| |0932|Beautiful Array||61.4%|Medium|| -|0933|Number of Recent Calls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0933.Number-of-Recent-Calls)|72.5%|Easy|| +|0933|Number of Recent Calls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0933.Number-of-Recent-Calls)|72.4%|Easy|| |0934|Shortest Bridge||50.0%|Medium|| |0935|Knight Dialer||46.8%|Medium|| |0936|Stamping The Sequence||53.3%|Hard|| |0937|Reorder Data in Log Files||54.9%|Easy|| -|0938|Range Sum of BST||83.3%|Easy|| +|0938|Range Sum of BST|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0938.Range-Sum-of-BST)|83.3%|Easy|| |0939|Minimum Area Rectangle||52.3%|Medium|| |0940|Distinct Subsequences II||41.5%|Hard|| |0941|Valid Mountain Array||33.0%|Easy|| @@ -1092,7 +1092,7 @@ |0951|Flip Equivalent Binary Trees||65.8%|Medium|| |0952|Largest Component Size by Common Factor|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0952.Largest-Component-Size-by-Common-Factor)|36.5%|Hard|| |0953|Verifying an Alien Dictionary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0953.Verifying-an-Alien-Dictionary)|52.5%|Easy|| -|0954|Array of Doubled Pairs||35.0%|Medium|| +|0954|Array of Doubled Pairs||35.1%|Medium|| |0955|Delete Columns to Make Sorted II||33.9%|Medium|| |0956|Tallest Billboard||39.9%|Hard|| |0957|Prison Cells After N Days||40.1%|Medium|| @@ -1100,17 +1100,17 @@ |0959|Regions Cut By Slashes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0959.Regions-Cut-By-Slashes)|67.2%|Medium|| |0960|Delete Columns to Make Sorted III||55.2%|Hard|| |0961|N-Repeated Element in Size 2N Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0961.N-Repeated-Element-in-Size-2N-Array)|74.7%|Easy|| -|0962|Maximum Width Ramp||46.6%|Medium|| +|0962|Maximum Width Ramp||46.7%|Medium|| |0963|Minimum Area Rectangle II||52.3%|Medium|| |0964|Least Operators to Express Number||45.3%|Hard|| |0965|Univalued Binary Tree||68.0%|Easy|| |0966|Vowel Spellchecker|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0966.Vowel-Spellchecker)|51.9%|Medium|| -|0967|Numbers With Same Consecutive Differences||45.2%|Medium|| +|0967|Numbers With Same Consecutive Differences||45.3%|Medium|| |0968|Binary Tree Cameras|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0968.Binary-Tree-Cameras)|39.0%|Hard|| |0969|Pancake Sorting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0969.Pancake-Sorting)|68.8%|Medium|| |0970|Powerful Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0970.Powerful-Integers)|40.1%|Medium|| |0971|Flip Binary Tree To Match Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal)|50.1%|Medium|| -|0972|Equal Rational Numbers||42.1%|Hard|| +|0972|Equal Rational Numbers||42.0%|Hard|| |0973|K Closest Points to Origin|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0973.K-Closest-Points-to-Origin)|64.7%|Medium|| |0974|Subarray Sums Divisible by K||51.1%|Medium|| |0975|Odd Even Jump||41.4%|Hard|| @@ -1120,29 +1120,29 @@ |0979|Distribute Coins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0979.Distribute-Coins-in-Binary-Tree)|70.0%|Medium|| |0980|Unique Paths III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0980.Unique-Paths-III)|77.1%|Hard|| |0981|Time Based Key-Value Store|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0981.Time-Based-Key-Value-Store)|54.3%|Medium|| -|0982|Triples with Bitwise AND Equal To Zero||56.4%|Hard|| +|0982|Triples with Bitwise AND Equal To Zero||56.5%|Hard|| |0983|Minimum Cost For Tickets||62.8%|Medium|| |0984|String Without AAA or BBB|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0984.String-Without-AAA-or-BBB)|38.8%|Medium|| |0985|Sum of Even Numbers After Queries|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0985.Sum-of-Even-Numbers-After-Queries)|60.6%|Easy|| |0986|Interval List Intersections|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0986.Interval-List-Intersections)|68.6%|Medium|| |0987|Vertical Order Traversal of a Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0987.Vertical-Order-Traversal-of-a-Binary-Tree)|39.1%|Hard|| |0988|Smallest String Starting From Leaf||46.9%|Medium|| -|0989|Add to Array-Form of Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0989.Add-to-Array-Form-of-Integer)|45.0%|Easy|| +|0989|Add to Array-Form of Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0989.Add-to-Array-Form-of-Integer)|44.9%|Easy|| |0990|Satisfiability of Equality Equations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0990.Satisfiability-of-Equality-Equations)|47.2%|Medium|| |0991|Broken Calculator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0991.Broken-Calculator)|49.7%|Medium|| |0992|Subarrays with K Different Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0992.Subarrays-with-K-Different-Integers)|50.9%|Hard|| |0993|Cousins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0993.Cousins-in-Binary-Tree)|52.3%|Easy|| |0994|Rotting Oranges||49.7%|Medium|| -|0995|Minimum Number of K Consecutive Bit Flips|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0995.Minimum-Number-of-K-Consecutive-Bit-Flips)|50.1%|Hard|| +|0995|Minimum Number of K Consecutive Bit Flips|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0995.Minimum-Number-of-K-Consecutive-Bit-Flips)|50.2%|Hard|| |0996|Number of Squareful Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0996.Number-of-Squareful-Arrays)|48.6%|Hard|| |0997|Find the Town Judge||49.8%|Easy|| |0998|Maximum Binary Tree II||64.2%|Medium|| |0999|Available Captures for Rook|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0999.Available-Captures-for-Rook)|67.7%|Easy|| |1000|Minimum Cost to Merge Stones||40.6%|Hard|| -|1001|Grid Illumination||36.0%|Hard|| -|1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.6%|Easy|| +|1001|Grid Illumination||36.1%|Hard|| +|1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.7%|Easy|| |1003|Check If Word Is Valid After Substitutions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1003.Check-If-Word-Is-Valid-After-Substitutions)|56.7%|Medium|| -|1004|Max Consecutive Ones III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1004.Max-Consecutive-Ones-III)|60.9%|Medium|| +|1004|Max Consecutive Ones III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1004.Max-Consecutive-Ones-III)|61.0%|Medium|| |1005|Maximize Sum Of Array After K Negations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1005.Maximize-Sum-Of-Array-After-K-Negations)|52.3%|Easy|| |1006|Clumsy Factorial|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1006.Clumsy-Factorial)|53.7%|Medium|| |1007|Minimum Domino Rotations For Equal Row||50.9%|Medium|| @@ -1175,7 +1175,7 @@ |1034|Coloring A Border||45.8%|Medium|| |1035|Uncrossed Lines||56.2%|Medium|| |1036|Escape a Large Maze||34.3%|Hard|| -|1037|Valid Boomerang|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1037.Valid-Boomerang)|37.6%|Easy|| +|1037|Valid Boomerang|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1037.Valid-Boomerang)|37.5%|Easy|| |1038|Binary Search Tree to Greater Sum Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1038.Binary-Search-Tree-to-Greater-Sum-Tree)|82.7%|Medium|| |1039|Minimum Score Triangulation of Polygon||50.5%|Medium|| |1040|Moving Stones Until Consecutive II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1040.Moving-Stones-Until-Consecutive-II)|54.3%|Medium|| @@ -1187,14 +1187,14 @@ |1046|Last Stone Weight||62.4%|Easy|| |1047|Remove All Adjacent Duplicates In String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1047.Remove-All-Adjacent-Duplicates-In-String)|71.5%|Easy|| |1048|Longest String Chain||55.7%|Medium|| -|1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|46.1%|Medium|| +|1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|46.2%|Medium|| |1050|Actors and Directors Who Cooperated At Least Three Times||72.4%|Easy|| |1051|Height Checker|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1051.Height-Checker)|72.4%|Easy|| |1052|Grumpy Bookstore Owner|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1052.Grumpy-Bookstore-Owner)|56.0%|Medium|| |1053|Previous Permutation With One Swap||51.3%|Medium|| |1054|Distant Barcodes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1054.Distant-Barcodes)|44.3%|Medium|| |1055|Shortest Way to Form String||57.3%|Medium|| -|1056|Confusing Number||47.0%|Easy|| +|1056|Confusing Number||47.1%|Easy|| |1057|Campus Bikes||58.0%|Medium|| |1058|Minimize Rounding Error to Meet Target||44.1%|Medium|| |1059|All Paths from Source Lead to Destination||43.0%|Medium|| @@ -1205,8 +1205,8 @@ |1064|Fixed Point||64.6%|Easy|| |1065|Index Pairs of a String||61.0%|Easy|| |1066|Campus Bikes II||54.3%|Medium|| -|1067|Digit Count in Range||41.7%|Hard|| -|1068|Product Sales Analysis I||82.0%|Easy|| +|1067|Digit Count in Range||41.8%|Hard|| +|1068|Product Sales Analysis I||81.9%|Easy|| |1069|Product Sales Analysis II||83.1%|Easy|| |1070|Product Sales Analysis III||50.0%|Medium|| |1071|Greatest Common Divisor of Strings||51.8%|Easy|| @@ -1214,13 +1214,13 @@ |1073|Adding Two Negabinary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1073.Adding-Two-Negabinary-Numbers)|34.8%|Medium|| |1074|Number of Submatrices That Sum to Target|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1074.Number-of-Submatrices-That-Sum-to-Target)|64.9%|Hard|| |1075|Project Employees I||66.3%|Easy|| -|1076|Project Employees II||52.8%|Easy|| +|1076|Project Employees II||52.7%|Easy|| |1077|Project Employees III||78.2%|Medium|| |1078|Occurrences After Bigram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1078.Occurrences-After-Bigram)|65.0%|Easy|| |1079|Letter Tile Possibilities|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1079.Letter-Tile-Possibilities)|76.0%|Medium|| |1080|Insufficient Nodes in Root to Leaf Paths||50.1%|Medium|| |1081|Smallest Subsequence of Distinct Characters||53.6%|Medium|| -|1082|Sales Analysis I||74.1%|Easy|| +|1082|Sales Analysis I||74.0%|Easy|| |1083|Sales Analysis II||50.9%|Easy|| |1084|Sales Analysis III||54.6%|Easy|| |1085|Sum of Digits in the Minimum Number||75.2%|Easy|| @@ -1235,26 +1235,26 @@ |1094|Car Pooling||59.7%|Medium|| |1095|Find in Mountain Array||36.1%|Hard|| |1096|Brace Expansion II||62.7%|Hard|| -|1097|Game Play Analysis V||57.0%|Hard|| +|1097|Game Play Analysis V||57.1%|Hard|| |1098|Unpopular Books||45.5%|Medium|| |1099|Two Sum Less Than K||60.8%|Easy|| |1100|Find K-Length Substrings With No Repeated Characters||73.1%|Medium|| |1101|The Earliest Moment When Everyone Become Friends||67.8%|Medium|| -|1102|Path With Maximum Minimum Value||51.0%|Medium|| +|1102|Path With Maximum Minimum Value||50.9%|Medium|| |1103|Distribute Candies to People||63.4%|Easy|| |1104|Path In Zigzag Labelled Binary Tree||73.4%|Medium|| |1105|Filling Bookcase Shelves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1105.Filling-Bookcase-Shelves)|57.5%|Medium|| -|1106|Parsing A Boolean Expression||59.4%|Hard|| -|1107|New Users Daily Count||46.1%|Medium|| +|1106|Parsing A Boolean Expression||59.5%|Hard|| +|1107|New Users Daily Count||46.0%|Medium|| |1108|Defanging an IP Address|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1108.Defanging-an-IP-Address)|88.4%|Easy|| |1109|Corporate Flight Bookings||54.3%|Medium|| |1110|Delete Nodes And Return Forest|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1110.Delete-Nodes-And-Return-Forest)|67.9%|Medium|| |1111|Maximum Nesting Depth of Two Valid Parentheses Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1111.Maximum-Nesting-Depth-of-Two-Valid-Parentheses-Strings)|72.8%|Medium|| |1112|Highest Grade For Each Student||72.4%|Medium|| -|1113|Reported Posts||66.0%|Easy|| -|1114|Print in Order||67.3%|Easy|| +|1113|Reported Posts||66.1%|Easy|| +|1114|Print in Order||67.4%|Easy|| |1115|Print FooBar Alternately||58.9%|Medium|| -|1116|Print Zero Even Odd||57.8%|Medium|| +|1116|Print Zero Even Odd||57.9%|Medium|| |1117|Building H2O||53.0%|Medium|| |1118|Number of Days in a Month||57.3%|Easy|| |1119|Remove Vowels from a String||90.6%|Easy|| @@ -1267,11 +1267,11 @@ |1126|Active Businesses||68.5%|Medium|| |1127|User Purchase Platform||50.8%|Hard|| |1128|Number of Equivalent Domino Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1128.Number-of-Equivalent-Domino-Pairs)|46.3%|Easy|| -|1129|Shortest Path with Alternating Colors||40.4%|Medium|| +|1129|Shortest Path with Alternating Colors||40.5%|Medium|| |1130|Minimum Cost Tree From Leaf Values||67.3%|Medium|| |1131|Maximum of Absolute Value Expression||51.4%|Medium|| |1132|Reported Posts II||34.6%|Medium|| -|1133|Largest Unique Number||67.5%|Easy|| +|1133|Largest Unique Number||67.4%|Easy|| |1134|Armstrong Number||77.9%|Easy|| |1135|Connecting Cities With Minimum Cost||59.8%|Medium|| |1136|Parallel Courses||61.1%|Medium|| @@ -1284,12 +1284,12 @@ |1143|Longest Common Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1143.Longest-Common-Subsequence)|58.7%|Medium|| |1144|Decrease Elements To Make Array Zigzag||46.3%|Medium|| |1145|Binary Tree Coloring Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1145.Binary-Tree-Coloring-Game)|51.2%|Medium|| -|1146|Snapshot Array||36.9%|Medium|| +|1146|Snapshot Array||36.8%|Medium|| |1147|Longest Chunked Palindrome Decomposition||59.6%|Hard|| |1148|Article Views I||77.1%|Easy|| |1149|Article Views II||48.3%|Medium|| -|1150|Check If a Number Is Majority Element in a Sorted Array||57.2%|Easy|| -|1151|Minimum Swaps to Group All 1's Together||58.7%|Medium|| +|1150|Check If a Number Is Majority Element in a Sorted Array||57.1%|Easy|| +|1151|Minimum Swaps to Group All 1's Together||58.8%|Medium|| |1152|Analyze User Website Visit Pattern||43.1%|Medium|| |1153|String Transforms Into Another String||35.8%|Hard|| |1154|Day of the Year|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1154.Day-of-the-Year)|49.1%|Easy|| @@ -1302,16 +1302,16 @@ |1161|Maximum Level Sum of a Binary Tree||68.6%|Medium|| |1162|As Far from Land as Possible||45.7%|Medium|| |1163|Last Substring in Lexicographical Order||36.2%|Hard|| -|1164|Product Price at a Given Date||68.8%|Medium|| +|1164|Product Price at a Given Date||68.9%|Medium|| |1165|Single-Row Keyboard||85.4%|Easy|| |1166|Design File System||58.6%|Medium|| |1167|Minimum Cost to Connect Sticks||64.6%|Medium|| -|1168|Optimize Water Distribution in a Village||61.2%|Hard|| -|1169|Invalid Transactions||30.9%|Medium|| +|1168|Optimize Water Distribution in a Village||61.3%|Hard|| +|1169|Invalid Transactions||30.8%|Medium|| |1170|Compare Strings by Frequency of the Smallest Character|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character)|60.4%|Medium|| -|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List)|41.6%|Medium|| +|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List)|41.5%|Medium|| |1172|Dinner Plate Stacks||37.5%|Hard|| -|1173|Immediate Food Delivery I||82.7%|Easy|| +|1173|Immediate Food Delivery I||82.8%|Easy|| |1174|Immediate Food Delivery II||62.3%|Medium|| |1175|Prime Arrangements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1175.Prime-Arrangements)|51.8%|Easy|| |1176|Diet Plan Performance||53.8%|Easy|| @@ -1322,22 +1322,22 @@ |1181|Before and After Puzzle||44.6%|Medium|| |1182|Shortest Distance to Target Color||53.7%|Medium|| |1183|Maximum Number of Ones||58.0%|Hard|| -|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|53.8%|Easy|| +|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|53.9%|Easy|| |1185|Day of the Week|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1185.Day-of-the-Week)|61.0%|Easy|| -|1186|Maximum Subarray Sum with One Deletion||39.1%|Medium|| +|1186|Maximum Subarray Sum with One Deletion||39.2%|Medium|| |1187|Make Array Strictly Increasing||42.3%|Hard|| -|1188|Design Bounded Blocking Queue||73.1%|Medium|| +|1188|Design Bounded Blocking Queue||73.0%|Medium|| |1189|Maximum Number of Balloons|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1189.Maximum-Number-of-Balloons)|62.2%|Easy|| |1190|Reverse Substrings Between Each Pair of Parentheses||64.3%|Medium|| |1191|K-Concatenation Maximum Sum||24.9%|Medium|| -|1192|Critical Connections in a Network||51.3%|Hard|| +|1192|Critical Connections in a Network||51.4%|Hard|| |1193|Monthly Transactions I||69.0%|Medium|| -|1194|Tournament Winners||52.5%|Hard|| +|1194|Tournament Winners||52.4%|Hard|| |1195|Fizz Buzz Multithreaded||70.9%|Medium|| |1196|How Many Apples Can You Put into the Basket||68.3%|Easy|| |1197|Minimum Knight Moves||37.6%|Medium|| |1198|Find Smallest Common Element in All Rows||76.2%|Medium|| -|1199|Minimum Time to Build Blocks||38.9%|Hard|| +|1199|Minimum Time to Build Blocks||39.0%|Hard|| |1200|Minimum Absolute Difference|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1200.Minimum-Absolute-Difference)|67.1%|Easy|| |1201|Ugly Number III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1201.Ugly-Number-III)|26.5%|Medium|| |1202|Smallest String With Swaps|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1202.Smallest-String-With-Swaps)|49.1%|Medium|| @@ -1346,14 +1346,14 @@ |1205|Monthly Transactions II||45.7%|Medium|| |1206|Design Skiplist||59.0%|Hard|| |1207|Unique Number of Occurrences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1207.Unique-Number-of-Occurrences)|72.0%|Easy|| -|1208|Get Equal Substrings Within Budget|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1208.Get-Equal-Substrings-Within-Budget)|44.3%|Medium|| -|1209|Remove All Adjacent Duplicates in String II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1209.Remove-All-Adjacent-Duplicates-in-String-II)|57.8%|Medium|| -|1210|Minimum Moves to Reach Target with Rotations||46.6%|Hard|| +|1208|Get Equal Substrings Within Budget|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1208.Get-Equal-Substrings-Within-Budget)|44.4%|Medium|| +|1209|Remove All Adjacent Duplicates in String II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1209.Remove-All-Adjacent-Duplicates-in-String-II)|57.7%|Medium|| +|1210|Minimum Moves to Reach Target with Rotations||46.7%|Hard|| |1211|Queries Quality and Percentage||70.3%|Easy|| |1212|Team Scores in Football Tournament||56.7%|Medium|| |1213|Intersection of Three Sorted Arrays||79.5%|Easy|| |1214|Two Sum BSTs||67.7%|Medium|| -|1215|Stepping Numbers||43.6%|Medium|| +|1215|Stepping Numbers||43.7%|Medium|| |1216|Valid Palindrome III||50.1%|Hard|| |1217|Minimum Cost to Move Chips to The Same Position|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position)|70.9%|Easy|| |1218|Longest Arithmetic Subsequence of Given Difference||46.9%|Medium|| @@ -1366,13 +1366,13 @@ |1225|Report Contiguous Dates||63.2%|Hard|| |1226|The Dining Philosophers||60.1%|Medium|| |1227|Airplane Seat Assignment Probability||62.3%|Medium|| -|1228|Missing Number In Arithmetic Progression||51.5%|Easy|| +|1228|Missing Number In Arithmetic Progression||51.3%|Easy|| |1229|Meeting Scheduler||54.4%|Medium|| |1230|Toss Strange Coins||50.5%|Medium|| |1231|Divide Chocolate||53.7%|Hard|| |1232|Check If It Is a Straight Line|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1232.Check-If-It-Is-a-Straight-Line)|43.1%|Easy|| |1233|Remove Sub-Folders from the Filesystem||62.6%|Medium|| -|1234|Replace the Substring for Balanced String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1234.Replace-the-Substring-for-Balanced-String)|34.6%|Medium|| +|1234|Replace the Substring for Balanced String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1234.Replace-the-Substring-for-Balanced-String)|34.7%|Medium|| |1235|Maximum Profit in Job Scheduling|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1235.Maximum-Profit-in-Job-Scheduling)|47.8%|Hard|| |1236|Web Crawler||64.8%|Medium|| |1237|Find Positive Integer Solution for a Given Equation||70.2%|Medium|| @@ -1383,25 +1383,25 @@ |1242|Web Crawler Multithreaded||47.8%|Medium|| |1243|Array Transformation||50.1%|Easy|| |1244|Design A Leaderboard||66.7%|Medium|| -|1245|Tree Diameter||61.3%|Medium|| +|1245|Tree Diameter||61.4%|Medium|| |1246|Palindrome Removal||45.7%|Hard|| |1247|Minimum Swaps to Make Strings Equal||63.0%|Medium|| |1248|Count Number of Nice Subarrays||56.2%|Medium|| |1249|Minimum Remove to Make Valid Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1249.Minimum-Remove-to-Make-Valid-Parentheses)|64.3%|Medium|| |1250|Check If It Is a Good Array||56.5%|Hard|| -|1251|Average Selling Price||82.9%|Easy|| +|1251|Average Selling Price||82.8%|Easy|| |1252|Cells with Odd Values in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1252.Cells-with-Odd-Values-in-a-Matrix)|78.6%|Easy|| |1253|Reconstruct a 2-Row Binary Matrix||41.9%|Medium|| |1254|Number of Closed Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1254.Number-of-Closed-Islands)|62.0%|Medium|| |1255|Maximum Score Words Formed by Letters||70.3%|Hard|| |1256|Encode Number||67.9%|Medium|| |1257|Smallest Common Region||61.2%|Medium|| -|1258|Synonymous Sentences||61.8%|Medium|| +|1258|Synonymous Sentences||61.7%|Medium|| |1259|Handshakes That Don't Cross||54.2%|Hard|| |1260|Shift 2D Grid|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1260.Shift-2D-Grid)|61.8%|Easy|| |1261|Find Elements in a Contaminated Binary Tree||74.6%|Medium|| -|1262|Greatest Sum Divisible by Three||50.0%|Medium|| -|1263|Minimum Moves to Move a Box to Their Target Location||43.7%|Hard|| +|1262|Greatest Sum Divisible by Three||50.1%|Medium|| +|1263|Minimum Moves to Move a Box to Their Target Location||43.6%|Hard|| |1264|Page Recommendations||69.2%|Medium|| |1265|Print Immutable Linked List in Reverse||94.2%|Medium|| |1266|Minimum Time Visiting All Points|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1266.Minimum-Time-Visiting-All-Points)|79.3%|Easy|| @@ -1424,28 +1424,28 @@ |1283|Find the Smallest Divisor Given a Threshold|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1283.Find-the-Smallest-Divisor-Given-a-Threshold)|50.0%|Medium|| |1284|Minimum Number of Flips to Convert Binary Matrix to Zero Matrix||70.2%|Hard|| |1285|Find the Start and End Number of Continuous Ranges||87.4%|Medium|| -|1286|Iterator for Combination||71.0%|Medium|| +|1286|Iterator for Combination||70.9%|Medium|| |1287|Element Appearing More Than 25% In Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1287.Element-Appearing-More-Than-25%-In-Sorted-Array)|60.3%|Easy|| |1288|Remove Covered Intervals||57.5%|Medium|| |1289|Minimum Falling Path Sum II||62.6%|Hard|| |1290|Convert Binary Number in a Linked List to Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer)|81.7%|Easy|| |1291|Sequential Digits||57.4%|Medium|| -|1292|Maximum Side Length of a Square with Sum Less than or Equal to Threshold||50.9%|Medium|| +|1292|Maximum Side Length of a Square with Sum Less than or Equal to Threshold||50.8%|Medium|| |1293|Shortest Path in a Grid with Obstacles Elimination||43.0%|Hard|| |1294|Weather Type in Each Country||66.7%|Easy|| |1295|Find Numbers with Even Number of Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1295.Find-Numbers-with-Even-Number-of-Digits)|78.7%|Easy|| |1296|Divide Array in Sets of K Consecutive Numbers||55.8%|Medium|| -|1297|Maximum Number of Occurrences of a Substring||50.9%|Medium|| +|1297|Maximum Number of Occurrences of a Substring||51.0%|Medium|| |1298|Maximum Candies You Can Get from Boxes||59.9%|Hard|| |1299|Replace Elements with Greatest Element on Right Side|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1299.Replace-Elements-with-Greatest-Element-on-Right-Side)|74.6%|Easy|| |1300|Sum of Mutated Array Closest to Target|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1300.Sum-of-Mutated-Array-Closest-to-Target)|43.0%|Medium|| |1301|Number of Paths with Max Score||38.2%|Hard|| -|1302|Deepest Leaves Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1302.Deepest-Leaves-Sum)|85.5%|Medium|| +|1302|Deepest Leaves Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1302.Deepest-Leaves-Sum)|85.4%|Medium|| |1303|Find the Team Size||89.9%|Easy|| |1304|Find N Unique Integers Sum up to Zero|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1304.Find-N-Unique-Integers-Sum-up-to-Zero)|76.7%|Easy|| |1305|All Elements in Two Binary Search Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1305.All-Elements-in-Two-Binary-Search-Trees)|77.8%|Medium|| -|1306|Jump Game III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1306.Jump-Game-III)|62.2%|Medium|| -|1307|Verbal Arithmetic Puzzle||36.4%|Hard|| +|1306|Jump Game III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1306.Jump-Game-III)|62.1%|Medium|| +|1307|Verbal Arithmetic Puzzle||36.3%|Hard|| |1308|Running Total for Different Genders||88.1%|Medium|| |1309|Decrypt String from Alphabet to Integer Mapping||77.8%|Easy|| |1310|XOR Queries of a Subarray||69.5%|Medium|| @@ -1464,7 +1464,7 @@ |1323|Maximum 69 Number||77.9%|Easy|| |1324|Print Words Vertically||59.0%|Medium|| |1325|Delete Leaves With a Given Value||73.8%|Medium|| -|1326|Minimum Number of Taps to Open to Water a Garden||47.5%|Hard|| +|1326|Minimum Number of Taps to Open to Water a Garden||47.6%|Hard|| |1327|List the Products Ordered in a Period||77.7%|Easy|| |1328|Break a Palindrome||48.1%|Medium|| |1329|Sort the Matrix Diagonally|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1329.Sort-the-Matrix-Diagonally)|81.6%|Medium|| @@ -1472,10 +1472,10 @@ |1331|Rank Transform of an Array||57.3%|Easy|| |1332|Remove Palindromic Subsequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1332.Remove-Palindromic-Subsequences)|68.4%|Easy|| |1333|Filter Restaurants by Vegan-Friendly, Price and Distance||57.5%|Medium|| -|1334|Find the City With the Smallest Number of Neighbors at a Threshold Distance||47.3%|Medium|| -|1335|Minimum Difficulty of a Job Schedule||56.5%|Hard|| +|1334|Find the City With the Smallest Number of Neighbors at a Threshold Distance||47.4%|Medium|| +|1335|Minimum Difficulty of a Job Schedule||56.6%|Hard|| |1336|Number of Transactions per Visit||49.4%|Hard|| -|1337|The K Weakest Rows in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1337.The-K-Weakest-Rows-in-a-Matrix)|72.1%|Easy|| +|1337|The K Weakest Rows in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1337.The-K-Weakest-Rows-in-a-Matrix)|72.0%|Easy|| |1338|Reduce Array Size to The Half||67.7%|Medium|| |1339|Maximum Product of Splitted Binary Tree||38.6%|Medium|| |1340|Jump Game V||59.4%|Hard|| @@ -1486,7 +1486,7 @@ |1345|Jump Game IV||42.0%|Hard|| |1346|Check If N and Its Double Exist||35.9%|Easy|| |1347|Minimum Number of Steps to Make Two Strings Anagram||75.1%|Medium|| -|1348|Tweet Counts Per Frequency||37.4%|Medium|| +|1348|Tweet Counts Per Frequency||37.5%|Medium|| |1349|Maximum Students Taking Exam||44.4%|Hard|| |1350|Students With Invalid Departments||90.5%|Easy|| |1351|Count Negative Numbers in a Sorted Matrix||75.8%|Easy|| @@ -1497,8 +1497,8 @@ |1356|Sort Integers by The Number of 1 Bits||70.5%|Easy|| |1357|Apply Discount Every n Orders||67.0%|Medium|| |1358|Number of Substrings Containing All Three Characters||60.6%|Medium|| -|1359|Count All Valid Pickup and Delivery Options||56.0%|Hard|| -|1360|Number of Days Between Two Dates||46.5%|Easy|| +|1359|Count All Valid Pickup and Delivery Options||55.9%|Hard|| +|1360|Number of Days Between Two Dates||46.6%|Easy|| |1361|Validate Binary Tree Nodes||43.2%|Medium|| |1362|Closest Divisors||57.9%|Medium|| |1363|Largest Multiple of Three||34.2%|Hard|| @@ -1506,7 +1506,7 @@ |1365|How Many Numbers Are Smaller Than the Current Number||86.0%|Easy|| |1366|Rank Teams by Votes||55.7%|Medium|| |1367|Linked List in Binary Tree||41.0%|Medium|| -|1368|Minimum Cost to Make at Least One Valid Path in a Grid||57.8%|Hard|| +|1368|Minimum Cost to Make at Least One Valid Path in a Grid||57.9%|Hard|| |1369|Get the Second Most Recent Activity||69.1%|Hard|| |1370|Increasing Decreasing String||77.5%|Easy|| |1371|Find the Longest Substring Containing Vowels in Even Counts||60.8%|Medium|| @@ -1519,26 +1519,26 @@ |1378|Replace Employee ID With The Unique Identifier||90.4%|Easy|| |1379|Find a Corresponding Node of a Binary Tree in a Clone of That Tree||84.6%|Medium|| |1380|Lucky Numbers in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1380.Lucky-Numbers-in-a-Matrix)|70.4%|Easy|| -|1381|Design a Stack With Increment Operation||76.3%|Medium|| +|1381|Design a Stack With Increment Operation||76.4%|Medium|| |1382|Balance a Binary Search Tree||76.2%|Medium|| |1383|Maximum Performance of a Team||36.1%|Hard|| |1384|Total Sales Amount by Year||65.3%|Hard|| |1385|Find the Distance Value Between Two Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1385.Find-the-Distance-Value-Between-Two-Arrays)|66.5%|Easy|| |1386|Cinema Seat Allocation||36.2%|Medium|| |1387|Sort Integers by The Power Value||70.6%|Medium|| -|1388|Pizza With 3n Slices||46.3%|Hard|| +|1388|Pizza With 3n Slices||46.4%|Hard|| |1389|Create Target Array in the Given Order|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1389.Create-Target-Array-in-the-Given-Order)|84.9%|Easy|| |1390|Four Divisors||39.6%|Medium|| |1391|Check if There is a Valid Path in a Grid||45.0%|Medium|| |1392|Longest Happy Prefix||42.2%|Hard|| -|1393|Capital Gain/Loss||91.0%|Medium|| +|1393|Capital Gain/Loss||91.1%|Medium|| |1394|Find Lucky Integer in an Array||63.1%|Easy|| -|1395|Count Number of Teams||74.7%|Medium|| +|1395|Count Number of Teams||74.6%|Medium|| |1396|Design Underground System|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1396.Design-Underground-System)|71.8%|Medium|| |1397|Find All Good Strings||38.8%|Hard|| |1398|Customers Who Bought Products A and B but Not C||82.3%|Medium|| |1399|Count Largest Group||65.4%|Easy|| -|1400|Construct K Palindrome Strings||63.1%|Medium|| +|1400|Construct K Palindrome Strings||63.0%|Medium|| |1401|Circle and Rectangle Overlapping||42.6%|Medium|| |1402|Reducing Dishes||72.0%|Hard|| |1403|Minimum Subsequence in Non-Increasing Order||71.9%|Easy|| @@ -1547,15 +1547,15 @@ |1406|Stone Game III||58.1%|Hard|| |1407|Top Travellers||84.0%|Easy|| |1408|String Matching in an Array||63.7%|Easy|| -|1409|Queries on a Permutation With Key||82.0%|Medium|| -|1410|HTML Entity Parser||54.0%|Medium|| -|1411|Number of Ways to Paint N × 3 Grid||60.5%|Hard|| +|1409|Queries on a Permutation With Key||81.9%|Medium|| +|1410|HTML Entity Parser||54.1%|Medium|| +|1411|Number of Ways to Paint N × 3 Grid||60.6%|Hard|| |1412|Find the Quiet Students in All Exams||63.9%|Hard|| |1413|Minimum Value to Get Positive Step by Step Sum||65.4%|Easy|| |1414|Find the Minimum Number of Fibonacci Numbers Whose Sum Is K||63.1%|Medium|| |1415|The k-th Lexicographical String of All Happy Strings of Length n||70.0%|Medium|| |1416|Restore The Array||36.7%|Hard|| -|1417|Reformat The String||56.7%|Easy|| +|1417|Reformat The String||56.6%|Easy|| |1418|Display Table of Food Orders in a Restaurant||69.4%|Medium|| |1419|Minimum Number of Frogs Croaking||47.8%|Medium|| |1420|Build Array Where You Can Find The Maximum Exactly K Comparisons||64.2%|Hard|| @@ -1563,7 +1563,7 @@ |1422|Maximum Score After Splitting a String||57.5%|Easy|| |1423|Maximum Points You Can Obtain from Cards|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1423.Maximum-Points-You-Can-Obtain-from-Cards)|47.0%|Medium|| |1424|Diagonal Traverse II||46.4%|Medium|| -|1425|Constrained Subsequence Sum||44.9%|Hard|| +|1425|Constrained Subsequence Sum||45.0%|Hard|| |1426|Counting Elements||59.1%|Easy|| |1427|Perform String Shifts||53.5%|Easy|| |1428|Leftmost Column with at Least a One||49.6%|Medium|| @@ -1577,7 +1577,7 @@ |1436|Destination City||77.3%|Easy|| |1437|Check If All 1's Are at Least Length K Places Away|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1437.Check-If-All-1's-Are-at-Least-Length-K-Places-Away)|61.8%|Easy|| |1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit)|44.5%|Medium|| -|1439|Find the Kth Smallest Sum of a Matrix With Sorted Rows|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1439.Find-the-Kth-Smallest-Sum-of-a-Matrix-With-Sorted-Rows)|60.4%|Hard|| +|1439|Find the Kth Smallest Sum of a Matrix With Sorted Rows|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1439.Find-the-Kth-Smallest-Sum-of-a-Matrix-With-Sorted-Rows)|60.5%|Hard|| |1440|Evaluate Boolean Expression||75.0%|Medium|| |1441|Build an Array With Stack Operations||70.4%|Easy|| |1442|Count Triplets That Can Form Two Arrays of Equal XOR||72.0%|Medium|| @@ -1587,7 +1587,7 @@ |1446|Consecutive Characters||61.3%|Easy|| |1447|Simplified Fractions||62.2%|Medium|| |1448|Count Good Nodes in Binary Tree||71.6%|Medium|| -|1449|Form Largest Integer With Digits That Add up to Target||44.4%|Hard|| +|1449|Form Largest Integer With Digits That Add up to Target||44.5%|Hard|| |1450|Number of Students Doing Homework at a Given Time||77.0%|Easy|| |1451|Rearrange Words in a Sentence||60.0%|Medium|| |1452|People Whose List of Favorite Companies Is Not a Subset of Another List||55.2%|Medium|| @@ -1599,7 +1599,7 @@ |1458|Max Dot Product of Two Subsequences||43.5%|Hard|| |1459|Rectangles Area||65.7%|Medium|| |1460|Make Two Arrays Equal by Reversing Sub-arrays||72.2%|Easy|| -|1461|Check If a String Contains All Binary Codes of Size K|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K)|54.3%|Medium|| +|1461|Check If a String Contains All Binary Codes of Size K|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K)|54.2%|Medium|| |1462|Course Schedule IV||44.9%|Medium|| |1463|Cherry Pickup II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1463.Cherry-Pickup-II)|68.8%|Hard|| |1464|Maximum Product of Two Elements in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1464.Maximum-Product-of-Two-Elements-in-an-Array)|77.1%|Easy|| @@ -1614,14 +1614,14 @@ |1473|Paint House III||48.6%|Hard|| |1474|Delete N Nodes After M Nodes of a Linked List||73.7%|Easy|| |1475|Final Prices With a Special Discount in a Shop||74.9%|Easy|| -|1476|Subrectangle Queries||88.1%|Medium|| +|1476|Subrectangle Queries||88.0%|Medium|| |1477|Find Two Non-overlapping Sub-arrays Each With Target Sum||35.2%|Medium|| |1478|Allocate Mailboxes||53.8%|Hard|| -|1479|Sales by Day of the Week||83.1%|Hard|| +|1479|Sales by Day of the Week||83.0%|Hard|| |1480|Running Sum of 1d Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1480.Running-Sum-of-1d-Array)|88.5%|Easy|| |1481|Least Number of Unique Integers after K Removals||55.9%|Medium|| -|1482|Minimum Number of Days to Make m Bouquets||51.0%|Medium|| -|1483|Kth Ancestor of a Tree Node||31.9%|Hard|| +|1482|Minimum Number of Days to Make m Bouquets||51.1%|Medium|| +|1483|Kth Ancestor of a Tree Node||32.0%|Hard|| |1484|Group Sold Products By The Date||85.3%|Easy|| |1485|Clone Binary Tree With Random Pointer||79.5%|Medium|| |1486|XOR Operation in an Array||84.0%|Easy|| @@ -1639,7 +1639,7 @@ |1498|Number of Subsequences That Satisfy the Given Sum Condition||39.0%|Medium|| |1499|Max Value of Equation||45.4%|Hard|| |1500|Design a File Sharing System||46.8%|Medium|| -|1501|Countries You Can Safely Invest In||60.3%|Medium|| +|1501|Countries You Can Safely Invest In||60.4%|Medium|| |1502|Can Make Arithmetic Progression From Sequence||71.0%|Easy|| |1503|Last Moment Before All Ants Fall Out of a Plank||53.3%|Medium|| |1504|Count Submatrices With All Ones||60.6%|Medium|| @@ -1647,12 +1647,12 @@ |1506|Find Root of N-Ary Tree||80.0%|Medium|| |1507|Reformat Date||60.2%|Easy|| |1508|Range Sum of Sorted Subarray Sums||60.2%|Medium|| -|1509|Minimum Difference Between Largest and Smallest Value in Three Moves||53.5%|Medium|| +|1509|Minimum Difference Between Largest and Smallest Value in Three Moves||53.6%|Medium|| |1510|Stone Game IV||59.0%|Hard|| |1511|Customer Order Frequency||74.3%|Easy|| |1512|Number of Good Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1512.Number-of-Good-Pairs)|87.6%|Easy|| |1513|Number of Substrings With Only 1s||42.1%|Medium|| -|1514|Path with Maximum Probability||41.1%|Medium|| +|1514|Path with Maximum Probability||41.2%|Medium|| |1515|Best Position for a Service Centre||38.5%|Hard|| |1516|Move Sub-Tree of N-Ary Tree||64.5%|Hard|| |1517|Find Users With Valid E-Mails||70.9%|Easy|| @@ -1660,33 +1660,33 @@ |1519|Number of Nodes in the Sub-Tree With the Same Label||37.4%|Medium|| |1520|Maximum Number of Non-Overlapping Substrings||36.6%|Hard|| |1521|Find a Value of a Mysterious Function Closest to Target||44.2%|Hard|| -|1522|Diameter of N-Ary Tree||69.3%|Medium|| +|1522|Diameter of N-Ary Tree||69.4%|Medium|| |1523|Count Odd Numbers in an Interval Range||54.1%|Easy|| |1524|Number of Sub-arrays With Odd Sum||40.2%|Medium|| -|1525|Number of Good Ways to Split a String||67.5%|Medium|| -|1526|Minimum Number of Increments on Subarrays to Form a Target Array||61.8%|Hard|| -|1527|Patients With a Condition||61.8%|Easy|| +|1525|Number of Good Ways to Split a String||67.6%|Medium|| +|1526|Minimum Number of Increments on Subarrays to Form a Target Array||61.9%|Hard|| +|1527|Patients With a Condition||61.6%|Easy|| |1528|Shuffle String||85.7%|Easy|| -|1529|Bulb Switcher IV||70.9%|Medium|| +|1529|Bulb Switcher IV||71.0%|Medium|| |1530|Number of Good Leaf Nodes Pairs||56.7%|Medium|| |1531|String Compression II||34.1%|Hard|| |1532|The Most Recent Three Orders||72.8%|Medium|| |1533|Find the Index of the Large Integer||54.5%|Medium|| |1534|Count Good Triplets||80.3%|Easy|| |1535|Find the Winner of an Array Game||47.7%|Medium|| -|1536|Minimum Swaps to Arrange a Binary Grid||43.6%|Medium|| +|1536|Minimum Swaps to Arrange a Binary Grid||43.7%|Medium|| |1537|Get the Maximum Score||36.6%|Hard|| -|1538|Guess the Majority in a Hidden Array||60.9%|Medium|| +|1538|Guess the Majority in a Hidden Array||61.0%|Medium|| |1539|Kth Missing Positive Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1539.Kth-Missing-Positive-Number)|54.8%|Easy|| |1540|Can Convert String in K Moves||31.3%|Medium|| |1541|Minimum Insertions to Balance a Parentheses String||43.2%|Medium|| -|1542|Find Longest Awesome Substring||36.6%|Hard|| +|1542|Find Longest Awesome Substring||36.7%|Hard|| |1543|Fix Product Name Format||66.7%|Easy|| |1544|Make The String Great||55.5%|Easy|| |1545|Find Kth Bit in Nth Binary String||57.7%|Medium|| -|1546|Maximum Number of Non-Overlapping Subarrays With Sum Equals Target||44.1%|Medium|| +|1546|Maximum Number of Non-Overlapping Subarrays With Sum Equals Target||44.2%|Medium|| |1547|Minimum Cost to Cut a Stick||52.8%|Hard|| -|1548|The Most Similar Path in a Graph||55.1%|Hard|| +|1548|The Most Similar Path in a Graph||55.2%|Hard|| |1549|The Most Recent Orders for Each Product||67.2%|Medium|| |1550|Three Consecutive Odds||64.5%|Easy|| |1551|Minimum Operations to Make Array Equal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1551.Minimum-Operations-to-Make-Array-Equal)|80.8%|Medium|| @@ -1695,25 +1695,25 @@ |1554|Strings Differ by One Character||64.2%|Medium|| |1555|Bank Account Summary||53.0%|Medium|| |1556|Thousand Separator||57.1%|Easy|| -|1557|Minimum Number of Vertices to Reach All Nodes||75.9%|Medium|| +|1557|Minimum Number of Vertices to Reach All Nodes||75.8%|Medium|| |1558|Minimum Numbers of Function Calls to Make Target Array||63.3%|Medium|| |1559|Detect Cycles in 2D Grid||44.7%|Hard|| |1560|Most Visited Sector in a Circular Track||56.9%|Easy|| |1561|Maximum Number of Coins You Can Get||77.2%|Medium|| |1562|Find Latest Group of Size M||39.7%|Medium|| -|1563|Stone Game V||39.9%|Hard|| -|1564|Put Boxes Into the Warehouse I||65.6%|Medium|| +|1563|Stone Game V||40.0%|Hard|| +|1564|Put Boxes Into the Warehouse I||65.7%|Medium|| |1565|Unique Orders and Customers Per Month||82.9%|Easy|| |1566|Detect Pattern of Length M Repeated K or More Times||42.6%|Easy|| |1567|Maximum Length of Subarray With Positive Product||37.1%|Medium|| |1568|Minimum Number of Days to Disconnect Island||50.1%|Hard|| -|1569|Number of Ways to Reorder Array to Get Same BST||49.9%|Hard|| +|1569|Number of Ways to Reorder Array to Get Same BST||50.0%|Hard|| |1570|Dot Product of Two Sparse Vectors||91.1%|Medium|| |1571|Warehouse Manager||90.0%|Easy|| |1572|Matrix Diagonal Sum||77.7%|Easy|| |1573|Number of Ways to Split a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1573.Number-of-Ways-to-Split-a-String)|31.4%|Medium|| |1574|Shortest Subarray to be Removed to Make Array Sorted||34.1%|Medium|| -|1575|Count All Possible Routes||57.1%|Hard|| +|1575|Count All Possible Routes||57.0%|Hard|| |1576|Replace All ?'s to Avoid Consecutive Repeating Characters||50.1%|Easy|| |1577|Number of Ways Where Square of Number Is Equal to Product of Two Numbers||38.0%|Medium|| |1578|Minimum Deletion Cost to Avoid Repeating Letters||60.7%|Medium|| @@ -1722,33 +1722,33 @@ |1581|Customer Who Visited but Did Not Make Any Transactions||89.6%|Easy|| |1582|Special Positions in a Binary Matrix||64.1%|Easy|| |1583|Count Unhappy Friends||55.2%|Medium|| -|1584|Min Cost to Connect All Points||53.5%|Medium|| +|1584|Min Cost to Connect All Points||53.6%|Medium|| |1585|Check If String Is Transformable With Substring Sort Operations||48.5%|Hard|| -|1586|Binary Search Tree Iterator II||67.0%|Medium|| +|1586|Binary Search Tree Iterator II||66.9%|Medium|| |1587|Bank Account Summary II||90.0%|Easy|| -|1588|Sum of All Odd Length Subarrays||81.6%|Easy|| +|1588|Sum of All Odd Length Subarrays||81.7%|Easy|| |1589|Maximum Sum Obtained of Any Permutation||35.0%|Medium|| |1590|Make Sum Divisible by P||26.9%|Medium|| |1591|Strange Printer II||55.6%|Hard|| -|1592|Rearrange Spaces Between Words||43.6%|Easy|| -|1593|Split a String Into the Max Number of Unique Substrings||50.0%|Medium|| +|1592|Rearrange Spaces Between Words||43.5%|Easy|| +|1593|Split a String Into the Max Number of Unique Substrings||50.1%|Medium|| |1594|Maximum Non Negative Product in a Matrix||32.4%|Medium|| |1595|Minimum Cost to Connect Two Groups of Points||43.6%|Hard|| -|1596|The Most Frequently Ordered Products for Each Customer||85.2%|Medium|| -|1597|Build Binary Expression Tree From Infix Expression||59.2%|Hard|| +|1596|The Most Frequently Ordered Products for Each Customer||85.3%|Medium|| +|1597|Build Binary Expression Tree From Infix Expression||59.3%|Hard|| |1598|Crawler Log Folder||63.8%|Easy|| |1599|Maximum Profit of Operating a Centennial Wheel||43.7%|Medium|| |1600|Throne Inheritance||60.7%|Medium|| |1601|Maximum Number of Achievable Transfer Requests||48.0%|Hard|| |1602|Find Nearest Right Node in Binary Tree||73.4%|Medium|| |1603|Design Parking System|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1603.Design-Parking-System)|86.3%|Easy|| -|1604|Alert Using Same Key-Card Three or More Times in a One Hour Period||43.2%|Medium|| -|1605|Find Valid Matrix Given Row and Column Sums||77.1%|Medium|| +|1604|Alert Using Same Key-Card Three or More Times in a One Hour Period||43.0%|Medium|| +|1605|Find Valid Matrix Given Row and Column Sums||77.2%|Medium|| |1606|Find Servers That Handled Most Number of Requests||37.6%|Hard|| |1607|Sellers With No Sales||55.4%|Easy|| |1608|Special Array With X Elements Greater Than or Equal X|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1608.Special-Array-With-X-Elements-Greater-Than-or-Equal-X)|61.4%|Easy|| |1609|Even Odd Tree||52.2%|Medium|| -|1610|Maximum Number of Visible Points||31.2%|Hard|| +|1610|Maximum Number of Visible Points||31.3%|Hard|| |1611|Minimum One Bit Operations to Make Integers Zero||58.0%|Hard|| |1612|Check If Two Expression Trees are Equivalent||69.9%|Medium|| |1613|Find the Missing IDs||74.7%|Medium|| @@ -1756,7 +1756,7 @@ |1615|Maximal Network Rank||53.2%|Medium|| |1616|Split Two Strings to Make Palindrome||36.1%|Medium|| |1617|Count Subtrees With Max Distance Between Cities||63.3%|Hard|| -|1618|Maximum Font to Fit a Sentence in a Screen||57.3%|Medium|| +|1618|Maximum Font to Fit a Sentence in a Screen||57.4%|Medium|| |1619|Mean of Array After Removing Some Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1619.Mean-of-Array-After-Removing-Some-Elements)|64.5%|Easy|| |1620|Coordinate With Maximum Network Quality||37.2%|Medium|| |1621|Number of Sets of K Non-Overlapping Line Segments||41.6%|Medium|| @@ -1765,160 +1765,160 @@ |1624|Largest Substring Between Two Equal Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1624.Largest-Substring-Between-Two-Equal-Characters)|58.5%|Easy|| |1625|Lexicographically Smallest String After Applying Operations||64.4%|Medium|| |1626|Best Team With No Conflicts||38.6%|Medium|| -|1627|Graph Connectivity With Threshold||40.4%|Hard|| -|1628|Design an Expression Tree With Evaluate Function||80.3%|Medium|| -|1629|Slowest Key|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1629.Slowest-Key)|59.1%|Easy|| +|1627|Graph Connectivity With Threshold||40.5%|Hard|| +|1628|Design an Expression Tree With Evaluate Function||80.4%|Medium|| +|1629|Slowest Key|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1629.Slowest-Key)|59.2%|Easy|| |1630|Arithmetic Subarrays||77.6%|Medium|| |1631|Path With Minimum Effort|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1631.Path-With-Minimum-Effort)|50.0%|Medium|| |1632|Rank Transform of a Matrix||32.4%|Hard|| -|1633|Percentage of Users Attended a Contest||71.4%|Easy|| +|1633|Percentage of Users Attended a Contest||71.3%|Easy|| |1634|Add Two Polynomials Represented as Linked Lists||53.9%|Medium|| -|1635|Hopper Company Queries I||56.2%|Hard|| +|1635|Hopper Company Queries I||56.1%|Hard|| |1636|Sort Array by Increasing Frequency|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1636.Sort-Array-by-Increasing-Frequency)|67.0%|Easy|| |1637|Widest Vertical Area Between Two Points Containing No Points||83.7%|Medium|| -|1638|Count Substrings That Differ by One Character||70.3%|Medium|| +|1638|Count Substrings That Differ by One Character||70.4%|Medium|| |1639|Number of Ways to Form a Target String Given a Dictionary||40.1%|Hard|| |1640|Check Array Formation Through Concatenation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1640.Check-Array-Formation-Through-Concatenation)|59.7%|Easy|| -|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|75.5%|Medium|| -|1642|Furthest Building You Can Reach||49.8%|Medium|| +|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|75.4%|Medium|| +|1642|Furthest Building You Can Reach|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1642.Furthest-Building-You-Can-Reach)|47.3%|Medium|| |1643|Kth Smallest Instructions||44.8%|Hard|| -|1644|Lowest Common Ancestor of a Binary Tree II||56.4%|Medium|| -|1645|Hopper Company Queries II||39.2%|Hard|| +|1644|Lowest Common Ancestor of a Binary Tree II||56.3%|Medium|| +|1645|Hopper Company Queries II||39.3%|Hard|| |1646|Get Maximum in Generated Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1646.Get-Maximum-in-Generated-Array)|53.1%|Easy|| |1647|Minimum Deletions to Make Character Frequencies Unique|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1647.Minimum-Deletions-to-Make-Character-Frequencies-Unique)|55.6%|Medium|| |1648|Sell Diminishing-Valued Colored Balls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1648.Sell-Diminishing-Valued-Colored-Balls)|30.7%|Medium|| |1649|Create Sorted Array through Instructions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1649.Create-Sorted-Array-through-Instructions)|36.7%|Hard|| |1650|Lowest Common Ancestor of a Binary Tree III||76.8%|Medium|| -|1651|Hopper Company Queries III||67.2%|Hard|| -|1652|Defuse the Bomb|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1652.Defuse-the-Bomb)|61.7%|Easy|| +|1651|Hopper Company Queries III||66.6%|Hard|| +|1652|Defuse the Bomb|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1652.Defuse-the-Bomb)|61.6%|Easy|| |1653|Minimum Deletions to Make String Balanced|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1653.Minimum-Deletions-to-Make-String-Balanced)|51.8%|Medium|| -|1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|25.0%|Medium|| +|1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|24.9%|Medium|| |1655|Distribute Repeating Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1655.Distribute-Repeating-Integers)|40.0%|Hard|| -|1656|Design an Ordered Stream|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1656.Design-an-Ordered-Stream)|82.0%|Easy|| +|1656|Design an Ordered Stream|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1656.Design-an-Ordered-Stream)|81.9%|Easy|| |1657|Determine if Two Strings Are Close|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1657.Determine-if-Two-Strings-Are-Close)|55.1%|Medium|| |1658|Minimum Operations to Reduce X to Zero|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1658.Minimum-Operations-to-Reduce-X-to-Zero)|33.3%|Medium|| |1659|Maximize Grid Happiness|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1659.Maximize-Grid-Happiness)|35.6%|Hard|| -|1660|Correct a Binary Tree||76.2%|Medium|| +|1660|Correct a Binary Tree||76.0%|Medium|| |1661|Average Time of Process per Machine||79.7%|Easy|| |1662|Check If Two String Arrays are Equivalent|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1662.Check-If-Two-String-Arrays-are-Equivalent)|82.5%|Easy|| -|1663|Smallest String With A Given Numeric Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1663.Smallest-String-With-A-Given-Numeric-Value)|64.3%|Medium|| -|1664|Ways to Make a Fair Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1664.Ways-to-Make-a-Fair-Array)|62.1%|Medium|| -|1665|Minimum Initial Energy to Finish Tasks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1665.Minimum-Initial-Energy-to-Finish-Tasks)|64.8%|Hard|| +|1663|Smallest String With A Given Numeric Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1663.Smallest-String-With-A-Given-Numeric-Value)|64.2%|Medium|| +|1664|Ways to Make a Fair Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1664.Ways-to-Make-a-Fair-Array)|62.0%|Medium|| +|1665|Minimum Initial Energy to Finish Tasks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1665.Minimum-Initial-Energy-to-Finish-Tasks)|64.7%|Hard|| |1666|Change the Root of a Binary Tree||68.8%|Medium|| -|1667|Fix Names in a Table||62.7%|Easy|| +|1667|Fix Names in a Table||62.6%|Easy|| |1668|Maximum Repeating Substring|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1668.Maximum-Repeating-Substring)|38.6%|Easy|| |1669|Merge In Between Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1669.Merge-In-Between-Linked-Lists)|75.5%|Medium|| -|1670|Design Front Middle Back Queue|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1670.Design-Front-Middle-Back-Queue)|54.0%|Medium|| +|1670|Design Front Middle Back Queue|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1670.Design-Front-Middle-Back-Queue)|54.1%|Medium|| |1671|Minimum Number of Removals to Make Mountain Array||45.0%|Hard|| |1672|Richest Customer Wealth|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1672.Richest-Customer-Wealth)|88.2%|Easy|| |1673|Find the Most Competitive Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1673.Find-the-Most-Competitive-Subsequence)|45.5%|Medium|| -|1674|Minimum Moves to Make Array Complementary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1674.Minimum-Moves-to-Make-Array-Complementary)|34.9%|Medium|| +|1674|Minimum Moves to Make Array Complementary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1674.Minimum-Moves-to-Make-Array-Complementary)|35.0%|Medium|| |1675|Minimize Deviation in Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1675.Minimize-Deviation-in-Array)|48.2%|Hard|| |1676|Lowest Common Ancestor of a Binary Tree IV||79.4%|Medium|| -|1677|Product's Worth Over Invoices||66.6%|Easy|| -|1678|Goal Parser Interpretation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1678.Goal-Parser-Interpretation)|85.3%|Easy|| +|1677|Product's Worth Over Invoices||65.9%|Easy|| +|1678|Goal Parser Interpretation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1678.Goal-Parser-Interpretation)|85.2%|Easy|| |1679|Max Number of K-Sum Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1679.Max-Number-of-K-Sum-Pairs)|53.7%|Medium|| |1680|Concatenation of Consecutive Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1680.Concatenation-of-Consecutive-Binary-Numbers)|52.3%|Medium|| |1681|Minimum Incompatibility|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1681.Minimum-Incompatibility)|35.9%|Hard|| -|1682|Longest Palindromic Subsequence II||51.3%|Medium|| +|1682|Longest Palindromic Subsequence II||51.4%|Medium|| |1683|Invalid Tweets||90.9%|Easy|| -|1684|Count the Number of Consistent Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1684.Count-the-Number-of-Consistent-Strings)|81.7%|Easy|| +|1684|Count the Number of Consistent Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1684.Count-the-Number-of-Consistent-Strings)|81.8%|Easy|| |1685|Sum of Absolute Differences in a Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1685.Sum-of-Absolute-Differences-in-a-Sorted-Array)|63.2%|Medium|| |1686|Stone Game VI||50.1%|Medium|| |1687|Delivering Boxes from Storage to Ports||35.3%|Hard|| -|1688|Count of Matches in Tournament|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1688.Count-of-Matches-in-Tournament)|81.4%|Easy|| -|1689|Partitioning Into Minimum Number Of Deci-Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1689.Partitioning-Into-Minimum-Number-Of-Deci-Binary-Numbers)|87.1%|Medium|| -|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|49.1%|Medium|| +|1688|Count of Matches in Tournament|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1688.Count-of-Matches-in-Tournament)|81.5%|Easy|| +|1689|Partitioning Into Minimum Number Of Deci-Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1689.Partitioning-Into-Minimum-Number-Of-Deci-Binary-Numbers)|87.0%|Medium|| +|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|49.2%|Medium|| |1691|Maximum Height by Stacking Cuboids|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1691.Maximum-Height-by-Stacking-Cuboids)|50.5%|Hard|| -|1692|Count Ways to Distribute Candies||60.4%|Hard|| -|1693|Daily Leads and Partners||91.1%|Easy|| -|1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|65.0%|Easy|| +|1692|Count Ways to Distribute Candies||60.5%|Hard|| +|1693|Daily Leads and Partners||90.8%|Easy|| +|1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|64.9%|Easy|| |1695|Maximum Erasure Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1695.Maximum-Erasure-Value)|49.2%|Medium|| |1696|Jump Game VI|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1696.Jump-Game-VI)|51.1%|Medium|| |1697|Checking Existence of Edge Length Limited Paths||54.0%|Hard|| -|1698|Number of Distinct Substrings in a String||60.5%|Medium|| -|1699|Number of Calls Between Two Persons||86.9%|Medium|| +|1698|Number of Distinct Substrings in a String||60.6%|Medium|| +|1699|Number of Calls Between Two Persons||86.8%|Medium|| |1700|Number of Students Unable to Eat Lunch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1700.Number-of-Students-Unable-to-Eat-Lunch)|67.6%|Easy|| |1701|Average Waiting Time||61.2%|Medium|| -|1702|Maximum Binary String After Change||59.3%|Medium|| -|1703|Minimum Adjacent Swaps for K Consecutive Ones||39.9%|Hard|| -|1704|Determine if String Halves Are Alike|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1704.Determine-if-String-Halves-Are-Alike)|79.1%|Easy|| +|1702|Maximum Binary String After Change||59.2%|Medium|| +|1703|Minimum Adjacent Swaps for K Consecutive Ones||40.0%|Hard|| +|1704|Determine if String Halves Are Alike|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1704.Determine-if-String-Halves-Are-Alike)|79.0%|Easy|| |1705|Maximum Number of Eaten Apples||41.7%|Medium|| -|1706|Where Will the Ball Fall||60.7%|Medium|| -|1707|Maximum XOR With an Element From Array||46.3%|Hard|| -|1708|Largest Subarray Length K||63.1%|Easy|| +|1706|Where Will the Ball Fall||60.8%|Medium|| +|1707|Maximum XOR With an Element From Array||46.4%|Hard|| +|1708|Largest Subarray Length K||63.2%|Easy|| |1709|Biggest Window Between Visits||82.5%|Medium|| |1710|Maximum Units on a Truck|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1710.Maximum-Units-on-a-Truck)|69.9%|Easy|| |1711|Count Good Meals||26.5%|Medium|| -|1712|Ways to Split Array Into Three Subarrays||29.3%|Medium|| +|1712|Ways to Split Array Into Three Subarrays||29.2%|Medium|| |1713|Minimum Operations to Make a Subsequence||45.6%|Hard|| |1714|Sum Of Special Evenly-Spaced Elements In Array||49.0%|Hard|| |1715|Count Apples and Oranges||79.0%|Medium|| -|1716|Calculate Money in Leetcode Bank|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1716.Calculate-Money-in-Leetcode-Bank)|64.7%|Easy|| -|1717|Maximum Score From Removing Substrings||41.1%|Medium|| -|1718|Construct the Lexicographically Largest Valid Sequence||47.0%|Medium|| -|1719|Number Of Ways To Reconstruct A Tree||38.9%|Hard|| -|1720|Decode XORed Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1720.Decode-XORed-Array)|85.2%|Easy|| +|1716|Calculate Money in Leetcode Bank|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1716.Calculate-Money-in-Leetcode-Bank)|64.6%|Easy|| +|1717|Maximum Score From Removing Substrings||41.2%|Medium|| +|1718|Construct the Lexicographically Largest Valid Sequence||47.1%|Medium|| +|1719|Number Of Ways To Reconstruct A Tree||39.2%|Hard|| +|1720|Decode XORed Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1720.Decode-XORed-Array)|85.1%|Easy|| |1721|Swapping Nodes in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1721.Swapping-Nodes-in-a-Linked-List)|67.3%|Medium|| -|1722|Minimize Hamming Distance After Swap Operations||54.2%|Medium|| +|1722|Minimize Hamming Distance After Swap Operations||54.3%|Medium|| |1723|Find Minimum Time to Finish All Jobs||43.8%|Hard|| -|1724|Checking Existence of Edge Length Limited Paths II||57.4%|Hard|| -|1725|Number Of Rectangles That Can Form The Largest Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1725.Number-Of-Rectangles-That-Can-Form-The-Largest-Square)|78.1%|Easy|| -|1726|Tuple with Same Product||57.1%|Medium|| -|1727|Largest Submatrix With Rearrangements||58.8%|Medium|| +|1724|Checking Existence of Edge Length Limited Paths II||57.5%|Hard|| +|1725|Number Of Rectangles That Can Form The Largest Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1725.Number-Of-Rectangles-That-Can-Form-The-Largest-Square)|78.0%|Easy|| +|1726|Tuple with Same Product||57.2%|Medium|| +|1727|Largest Submatrix With Rearrangements||58.9%|Medium|| |1728|Cat and Mouse II||41.0%|Hard|| |1729|Find Followers Count||70.9%|Easy|| -|1730|Shortest Path to Get Food||55.5%|Medium|| +|1730|Shortest Path to Get Food||54.7%|Medium|| |1731|The Number of Employees Which Report to Each Employee||49.4%|Easy|| -|1732|Find the Highest Altitude|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1732.Find-the-Highest-Altitude)|79.8%|Easy|| +|1732|Find the Highest Altitude|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1732.Find-the-Highest-Altitude)|79.7%|Easy|| |1733|Minimum Number of People to Teach||38.0%|Medium|| -|1734|Decode XORed Permutation||54.4%|Medium|| -|1735|Count Ways to Make Array With Product||48.0%|Hard|| +|1734|Decode XORed Permutation||54.5%|Medium|| +|1735|Count Ways to Make Array With Product||48.1%|Hard|| |1736|Latest Time by Replacing Hidden Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1736.Latest-Time-by-Replacing-Hidden-Digits)|41.2%|Easy|| |1737|Change Minimum Characters to Satisfy One of Three Conditions||30.1%|Medium|| |1738|Find Kth Largest XOR Coordinate Value||62.5%|Medium|| -|1739|Building Boxes||49.5%|Hard|| -|1740|Find Distance in a Binary Tree||67.7%|Medium|| -|1741|Find Total Time Spent by Each Employee||91.1%|Easy|| -|1742|Maximum Number of Balls in a Box|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1742.Maximum-Number-of-Balls-in-a-Box)|73.6%|Easy|| +|1739|Building Boxes||49.4%|Hard|| +|1740|Find Distance in a Binary Tree||67.8%|Medium|| +|1741|Find Total Time Spent by Each Employee||90.7%|Easy|| +|1742|Maximum Number of Balls in a Box|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1742.Maximum-Number-of-Balls-in-a-Box)|73.5%|Easy|| |1743|Restore the Array From Adjacent Pairs||63.6%|Medium|| |1744|Can You Eat Your Favorite Candy on Your Favorite Day?||30.8%|Medium|| |1745|Palindrome Partitioning IV||49.4%|Hard|| -|1746|Maximum Subarray Sum After One Operation||61.8%|Medium|| +|1746|Maximum Subarray Sum After One Operation||62.1%|Medium|| |1747|Leetflex Banned Accounts||68.8%|Medium|| |1748|Sum of Unique Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1748.Sum-of-Unique-Elements)|74.7%|Easy|| |1749|Maximum Absolute Sum of Any Subarray||52.7%|Medium|| |1750|Minimum Length of String After Deleting Similar Ends||42.3%|Medium|| |1751|Maximum Number of Events That Can Be Attended II||48.5%|Hard|| -|1752|Check if Array Is Sorted and Rotated|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1752.Check-if-Array-Is-Sorted-and-Rotated)|60.1%|Easy|| -|1753|Maximum Score From Removing Stones||61.9%|Medium|| +|1752|Check if Array Is Sorted and Rotated|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1752.Check-if-Array-Is-Sorted-and-Rotated)|60.0%|Easy|| +|1753|Maximum Score From Removing Stones||62.0%|Medium|| |1754|Largest Merge Of Two Strings||40.9%|Medium|| |1755|Closest Subsequence Sum||35.8%|Hard|| |1756|Design Most Recently Used Queue||77.7%|Medium|| -|1757|Recyclable and Low Fat Products||95.7%|Easy|| -|1758|Minimum Changes To Make Alternating Binary String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1758.Minimum-Changes-To-Make-Alternating-Binary-String)|58.1%|Easy|| +|1757|Recyclable and Low Fat Products||95.6%|Easy|| +|1758|Minimum Changes To Make Alternating Binary String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1758.Minimum-Changes-To-Make-Alternating-Binary-String)|58.0%|Easy|| |1759|Count Number of Homogenous Substrings||42.9%|Medium|| |1760|Minimum Limit of Balls in a Bag||53.1%|Medium|| -|1761|Minimum Degree of a Connected Trio in a Graph||37.5%|Hard|| -|1762|Buildings With an Ocean View||81.2%|Medium|| +|1761|Minimum Degree of a Connected Trio in a Graph||37.6%|Hard|| +|1762|Buildings With an Ocean View||81.3%|Medium|| |1763|Longest Nice Substring||61.3%|Easy|| -|1764|Form Array by Concatenating Subarrays of Another Array||54.4%|Medium|| -|1765|Map of Highest Peak||55.3%|Medium|| +|1764|Form Array by Concatenating Subarrays of Another Array||54.3%|Medium|| +|1765|Map of Highest Peak||55.4%|Medium|| |1766|Tree of Coprimes||36.7%|Hard|| -|1767|Find the Subtasks That Did Not Execute||86.1%|Hard|| +|1767|Find the Subtasks That Did Not Execute||86.2%|Hard|| |1768|Merge Strings Alternately||75.3%|Easy|| |1769|Minimum Number of Operations to Move All Balls to Each Box||86.5%|Medium|| -|1770|Maximum Score from Performing Multiplication Operations||29.7%|Medium|| +|1770|Maximum Score from Performing Multiplication Operations||29.8%|Medium|| |1771|Maximize Palindrome Length From Subsequences||34.2%|Hard|| -|1772|Sort Features by Popularity||65.1%|Medium|| -|1773|Count Items Matching a Rule||84.8%|Easy|| -|1774|Closest Dessert Cost||57.7%|Medium|| +|1772|Sort Features by Popularity||65.2%|Medium|| +|1773|Count Items Matching a Rule||84.9%|Easy|| +|1774|Closest Dessert Cost||57.6%|Medium|| |1775|Equal Sum Arrays With Minimum Number of Operations||50.6%|Medium|| |1776|Car Fleet II||47.5%|Hard|| -|1777|Product's Price for Each Store||87.6%|Easy|| -|1778|Shortest Path in a Hidden Grid||45.8%|Medium|| +|1777|Product's Price for Each Store||87.4%|Easy|| +|1778|Shortest Path in a Hidden Grid||45.7%|Medium|| |1779|Find Nearest Point That Has the Same X or Y Coordinate||66.9%|Easy|| -|1780|Check if Number is a Sum of Powers of Three||63.0%|Medium|| +|1780|Check if Number is a Sum of Powers of Three||63.1%|Medium|| |1781|Sum of Beauty of All Substrings||58.2%|Medium|| |1782|Count Pairs Of Nodes||33.2%|Hard|| |1783|Grand Slam Titles||90.8%|Medium|| @@ -1926,60 +1926,60 @@ |1785|Minimum Elements to Add to Form a Given Sum||39.4%|Medium|| |1786|Number of Restricted Paths From First to Last Node||36.1%|Medium|| |1787|Make the XOR of All Segments Equal to Zero||36.8%|Hard|| -|1788|Maximize the Beauty of the Garden||68.3%|Hard|| +|1788|Maximize the Beauty of the Garden||69.0%|Hard|| |1789|Primary Department for Each Employee||78.8%|Easy|| -|1790|Check if One String Swap Can Make Strings Equal||58.9%|Easy|| +|1790|Check if One String Swap Can Make Strings Equal||58.8%|Easy|| |1791|Find Center of Star Graph||84.5%|Medium|| |1792|Maximum Average Pass Ratio||55.9%|Medium|| |1793|Maximum Score of a Good Subarray||46.7%|Hard|| |1794|Count Pairs of Equal Substrings With Minimum Difference||68.6%|Medium|| -|1795|Rearrange Products Table||90.6%|Easy|| +|1795|Rearrange Products Table||90.5%|Easy|| |1796|Second Largest Digit in a String||48.0%|Easy|| |1797|Design Authentication Manager||49.1%|Medium|| -|1798|Maximum Number of Consecutive Values You Can Make||44.8%|Medium|| -|1799|Maximize Score After N Operations||50.0%|Hard|| -|1800|Maximum Ascending Subarray Sum||65.2%|Easy|| +|1798|Maximum Number of Consecutive Values You Can Make||44.9%|Medium|| +|1799|Maximize Score After N Operations||49.9%|Hard|| +|1800|Maximum Ascending Subarray Sum||65.1%|Easy|| |1801|Number of Orders in the Backlog||43.8%|Medium|| |1802|Maximum Value at a Given Index in a Bounded Array||27.7%|Medium|| -|1803|Count Pairs With XOR in a Range||43.6%|Hard|| -|1804|Implement Trie II (Prefix Tree)||59.5%|Medium|| -|1805|Number of Different Integers in a String||47.9%|Easy|| +|1803|Count Pairs With XOR in a Range||43.7%|Hard|| +|1804|Implement Trie II (Prefix Tree)||59.3%|Medium|| +|1805|Number of Different Integers in a String||47.7%|Easy|| |1806|Minimum Number of Operations to Reinitialize a Permutation||70.4%|Medium|| |1807|Evaluate the Bracket Pairs of a String||66.5%|Medium|| |1808|Maximize Number of Nice Divisors||27.7%|Hard|| -|1809|Ad-Free Sessions||66.7%|Easy|| -|1810|Minimum Path Cost in a Hidden Grid||55.4%|Medium|| -|1811|Find Interview Candidates||71.1%|Medium|| -|1812|Determine Color of a Chessboard Square||78.2%|Easy|| +|1809|Ad-Free Sessions||66.3%|Easy|| +|1810|Minimum Path Cost in a Hidden Grid||53.4%|Medium|| +|1811|Find Interview Candidates||70.7%|Medium|| +|1812|Determine Color of a Chessboard Square||78.3%|Easy|| |1813|Sentence Similarity III||43.8%|Medium|| -|1814|Count Nice Pairs in an Array||38.4%|Medium|| +|1814|Count Nice Pairs in an Array||38.5%|Medium|| |1815|Maximum Number of Groups Getting Fresh Donuts||38.9%|Hard|| |1816|Truncate Sentence||78.8%|Easy|| |1817|Finding the Users Active Minutes||78.7%|Medium|| -|1818|Minimum Absolute Sum Difference||42.0%|Medium|| -|1819|Number of Different Subsequences GCDs||32.9%|Hard|| -|1820|Maximum Number of Accepted Invitations||49.8%|Medium|| +|1818|Minimum Absolute Sum Difference||41.8%|Medium|| +|1819|Number of Different Subsequences GCDs||33.0%|Hard|| +|1820|Maximum Number of Accepted Invitations||49.7%|Medium|| |1821|Find Customers With Positive Revenue this Year||89.4%|Easy|| -|1822|Sign of the Product of an Array||81.6%|Easy|| +|1822|Sign of the Product of an Array||80.8%|Easy|| |1823|Find the Winner of the Circular Game||72.0%|Medium|| -|1824|Minimum Sideway Jumps||59.7%|Medium|| +|1824|Minimum Sideway Jumps||59.4%|Medium|| |1825|Finding MK Average||31.3%|Hard|| -|1826|Faulty Sensor||60.1%|Easy|| +|1826|Faulty Sensor||60.0%|Easy|| |1827|Minimum Operations to Make the Array Increasing||79.2%|Easy|| -|1828|Queries on Number of Points Inside a Circle||88.0%|Medium|| -|1829|Maximum XOR for Each Query||72.4%|Medium|| -|1830|Minimum Number of Operations to Make String Sorted||46.0%|Hard|| -|1831|Maximum Transaction Each Day||87.5%|Medium|| -|1832|Check if the Sentence Is Pangram||85.3%|Easy|| -|1833|Maximum Ice Cream Bars||92.5%|Medium|| -|1834|Single-Threaded CPU||40.3%|Medium|| -|1835|Find XOR Sum of All Pairs Bitwise AND||54.7%|Hard|| -|1836|Remove Duplicates From an Unsorted Linked List||78.2%|Medium|| -|1837|Sum of Digits in Base K||74.9%|Easy|| -|1838|Frequency of the Most Frequent Element||28.1%|Medium|| -|1839|Longest Substring Of All Vowels in Order||47.1%|Medium|| -|1840|Maximum Building Height||31.1%|Hard|| -|1841|League Statistics||50.0%|Medium|| +|1828|Queries on Number of Points Inside a Circle||87.9%|Medium|| +|1829|Maximum XOR for Each Query||72.6%|Medium|| +|1830|Minimum Number of Operations to Make String Sorted||46.2%|Hard|| +|1831|Maximum Transaction Each Day||87.6%|Medium|| +|1832|Check if the Sentence Is Pangram||85.0%|Easy|| +|1833|Maximum Ice Cream Bars||88.4%|Medium|| +|1834|Single-Threaded CPU||40.2%|Medium|| +|1835|Find XOR Sum of All Pairs Bitwise AND||55.0%|Hard|| +|1836|Remove Duplicates From an Unsorted Linked List||76.8%|Medium|| +|1837|Sum of Digits in Base K||75.4%|Easy|| +|1838|Frequency of the Most Frequent Element||30.7%|Medium|| +|1839|Longest Substring Of All Vowels in Order||48.5%|Medium|| +|1840|Maximum Building Height||33.3%|Hard|| +|1841|League Statistics||66.3%|Medium|| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------| ------------------------------------------------------------------ diff --git a/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST.go b/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST.go new file mode 100644 index 00000000..3225367b --- /dev/null +++ b/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST.go @@ -0,0 +1,34 @@ +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/structures" +) + +// TreeNode define +type TreeNode = structures.TreeNode + +/** + * Definition for a binary tree node. + * type TreeNode struct { + * Val int + * Left *TreeNode + * Right *TreeNode + * } + */ + +func rangeSumBST(root *TreeNode, low int, high int) int { + res := 0 + preOrder(root, low, high, &res) + return res +} + +func preOrder(root *TreeNode, low, high int, res *int) { + if root == nil { + return + } + if low <= root.Val && root.Val <= high { + *res += root.Val + } + preOrder(root.Left, low, high, res) + preOrder(root.Right, low, high, res) +} diff --git a/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST_test.go b/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST_test.go new file mode 100644 index 00000000..0f06ee18 --- /dev/null +++ b/leetcode/0938.Range-Sum-of-BST/938. Range Sum of BST_test.go @@ -0,0 +1,53 @@ +package leetcode + +import ( + "fmt" + "testing" + + "github.com/halfrost/LeetCode-Go/structures" +) + +type question938 struct { + para938 + ans938 +} + +// para 是参数 +// one 代表第一个参数 +type para938 struct { + one []int + low int + high int +} + +// ans 是答案 +// one 代表第一个答案 +type ans938 struct { + one int +} + +func Test_Problem938(t *testing.T) { + + qs := []question938{ + + { + para938{[]int{10, 5, 15, 3, 7, structures.NULL, 18}, 7, 15}, + ans938{32}, + }, + + { + para938{[]int{10, 5, 15, 3, 7, 13, 18, 1, structures.NULL, 6}, 6, 10}, + ans938{23}, + }, + } + + fmt.Printf("------------------------Leetcode Problem 938------------------------\n") + + for _, q := range qs { + _, p := q.ans938, q.para938 + fmt.Printf("【input】:%v ", p) + rootOne := structures.Ints2TreeNode(p.one) + fmt.Printf("【output】:%v \n", rangeSumBST(rootOne, p.low, p.high)) + } + fmt.Printf("\n\n\n") +} diff --git a/leetcode/0938.Range-Sum-of-BST/README.md b/leetcode/0938.Range-Sum-of-BST/README.md new file mode 100644 index 00000000..c6f04ac6 --- /dev/null +++ b/leetcode/0938.Range-Sum-of-BST/README.md @@ -0,0 +1,80 @@ +# [938. Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/) + + +## 题目 + +Given the `root` node of a binary search tree, return *the sum of values of all nodes with a value in the range `[low, high]`*. + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/11/05/bst1.jpg](https://assets.leetcode.com/uploads/2020/11/05/bst1.jpg) + +``` +Input: root = [10,5,15,3,7,null,18], low = 7, high = 15 +Output: 32 + +``` + +**Example 2:** + +![https://assets.leetcode.com/uploads/2020/11/05/bst2.jpg](https://assets.leetcode.com/uploads/2020/11/05/bst2.jpg) + +``` +Input: root = [10,5,15,3,7,13,18,1,null,6], low = 6, high = 10 +Output: 23 + +``` + +**Constraints:** + +- The number of nodes in the tree is in the range `[1, 2 * 10^4]`. +- `1 <= Node.val <= 10^5` +- `1 <= low <= high <= 10^5` +- All `Node.val` are **unique**. + +## 题目大意 + +给定二叉搜索树的根结点 root,返回值位于范围 [low, high] 之间的所有结点的值的和。 + +## 解题思路 + +- 简单题。因为二叉搜索树的有序性,先序遍历即为有序。遍历过程中判断节点值是否位于区间范围内,在区间内就累加,不在区间内节点就不管。最终输出累加和。 + +## 代码 + +```go +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/structures" +) + +// TreeNode define +type TreeNode = structures.TreeNode + +/** + * Definition for a binary tree node. + * type TreeNode struct { + * Val int + * Left *TreeNode + * Right *TreeNode + * } + */ + +func rangeSumBST(root *TreeNode, low int, high int) int { + res := 0 + preOrder(root, low, high, &res) + return res +} + +func preOrder(root *TreeNode, low, high int, res *int) { + if root == nil { + return + } + if low <= root.Val && root.Val <= high { + *res += root.Val + } + preOrder(root.Left, low, high, res) + preOrder(root.Right, low, high, res) +} +``` \ No newline at end of file diff --git a/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach.go b/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach.go new file mode 100644 index 00000000..c2adc1d9 --- /dev/null +++ b/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach.go @@ -0,0 +1,40 @@ +package leetcode + +import ( + "container/heap" +) + +func furthestBuilding(heights []int, bricks int, ladder int) int { + usedLadder := &heightDiffPQ{} + for i := 1; i < len(heights); i++ { + needbricks := heights[i] - heights[i-1] + if needbricks < 0 { + continue + } + if ladder > 0 { + heap.Push(usedLadder, needbricks) + ladder-- + } else { + if len(*usedLadder) > 0 && needbricks > (*usedLadder)[0] { + needbricks, (*usedLadder)[0] = (*usedLadder)[0], needbricks + heap.Fix(usedLadder, 0) + } + if bricks -= needbricks; bricks < 0 { + return i - 1 + } + } + } + return len(heights) - 1 +} + +type heightDiffPQ []int + +func (pq heightDiffPQ) Len() int { return len(pq) } +func (pq heightDiffPQ) Less(i, j int) bool { return pq[i] < pq[j] } +func (pq heightDiffPQ) Swap(i, j int) { pq[i], pq[j] = pq[j], pq[i] } +func (pq *heightDiffPQ) Push(x interface{}) { *pq = append(*pq, x.(int)) } +func (pq *heightDiffPQ) Pop() interface{} { + x := (*pq)[len(*pq)-1] + *pq = (*pq)[:len(*pq)-1] + return x +} diff --git a/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach_test.go b/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach_test.go new file mode 100644 index 00000000..ee04d85a --- /dev/null +++ b/leetcode/1642.Furthest-Building-You-Can-Reach/1642. Furthest Building You Can Reach_test.go @@ -0,0 +1,59 @@ +package leetcode + +import ( + "fmt" + "testing" +) + +type question1642 struct { + para1642 + ans1642 +} + +// para 是参数 +// one 代表第一个参数 +type para1642 struct { + heights []int + bricks int + ladders int +} + +// ans 是答案 +// one 代表第一个答案 +type ans1642 struct { + one int +} + +func Test_Problem1642(t *testing.T) { + + qs := []question1642{ + + { + para1642{[]int{1, 5, 1, 2, 3, 4, 10000}, 4, 1}, + ans1642{5}, + }, + + { + para1642{[]int{4, 2, 7, 6, 9, 14, 12}, 5, 1}, + ans1642{4}, + }, + + { + para1642{[]int{4, 12, 2, 7, 3, 18, 20, 3, 19}, 10, 2}, + ans1642{7}, + }, + + { + para1642{[]int{14, 3, 19, 3}, 17, 0}, + ans1642{3}, + }, + } + + fmt.Printf("------------------------Leetcode Problem 1642------------------------\n") + + for _, q := range qs { + _, p := q.ans1642, q.para1642 + fmt.Printf("【input】:%v 【output】:%v \n", p, furthestBuilding(p.heights, p.bricks, p.ladders)) + } + fmt.Printf("\n\n\n") +} diff --git a/leetcode/1642.Furthest-Building-You-Can-Reach/README.md b/leetcode/1642.Furthest-Building-You-Can-Reach/README.md new file mode 100644 index 00000000..e111e26e --- /dev/null +++ b/leetcode/1642.Furthest-Building-You-Can-Reach/README.md @@ -0,0 +1,113 @@ +# [1642. Furthest Building You Can Reach](https://leetcode.com/problems/furthest-building-you-can-reach/) + + +## 题目 + +You are given an integer array `heights` representing the heights of buildings, some `bricks`, and some `ladders`. + +You start your journey from building `0` and move to the next building by possibly using bricks or ladders. + +While moving from building `i` to building `i+1` (**0-indexed**), + +- If the current building's height is **greater than or equal** to the next building's height, you do **not** need a ladder or bricks. +- If the current building's height is **less than** the next building's height, you can either use **one ladder** or `(h[i+1] - h[i])` **bricks**. + +*Return the furthest building index (0-indexed) you can reach if you use the given ladders and bricks optimally.* + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/10/27/q4.gif](https://assets.leetcode.com/uploads/2020/10/27/q4.gif) + +``` +Input: heights = [4,2,7,6,9,14,12], bricks = 5, ladders = 1 +Output: 4 +Explanation: Starting at building 0, you can follow these steps: +- Go to building 1 without using ladders nor bricks since 4 >= 2. +- Go to building 2 using 5 bricks. You must use either bricks or ladders because 2 < 7. +- Go to building 3 without using ladders nor bricks since 7 >= 6. +- Go to building 4 using your only ladder. You must use either bricks or ladders because 6 < 9. +It is impossible to go beyond building 4 because you do not have any more bricks or ladders. + +``` + +**Example 2:** + +``` +Input: heights = [4,12,2,7,3,18,20,3,19], bricks = 10, ladders = 2 +Output: 7 + +``` + +**Example 3:** + +``` +Input: heights = [14,3,19,3], bricks = 17, ladders = 0 +Output: 3 + +``` + +**Constraints:** + +- `1 <= heights.length <= 10^5` +- `1 <= heights[i] <= 10^6` +- `0 <= bricks <= 10^9` +- `0 <= ladders <= heights.length` + +## 题目大意 + +给你一个整数数组 heights ,表示建筑物的高度。另有一些砖块 bricks 和梯子 ladders 。你从建筑物 0 开始旅程,不断向后面的建筑物移动,期间可能会用到砖块或梯子。当从建筑物 i 移动到建筑物 i+1(下标 从 0 开始 )时: + +- 如果当前建筑物的高度 大于或等于 下一建筑物的高度,则不需要梯子或砖块。 +- 如果当前建筑的高度 小于 下一个建筑的高度,您可以使用 一架梯子 或 (h[i+1] - h[i]) 个砖块 + +如果以最佳方式使用给定的梯子和砖块,返回你可以到达的最远建筑物的下标(下标 从 0 开始 )。 + +## 解题思路 + +- 这一题可能会想到贪心算法。梯子很厉害,可以无限长,所以梯子用来跨越最高的楼。遇到非最高的距离差,先用砖头。这样贪心的话不正确。例如,[1, 5, 1, 2, 3, 4, 10000] 这组数据,梯子有 1 个,4 块砖头。最大的差距在 10000 和 4 之间,贪心选择在此处用梯子。但是砖头不足以让我们走到最后两栋楼。贪心得到的结果是 3,正确的结果是 5,先用梯子,再用砖头走过 3,4,5 号楼。 +- 上面的贪心解法错误在于没有“动态”的贪心,使用梯子应该选择能爬过楼里面最高的 2 个。于是顺理成章的想到了优先队列。维护一个长度为梯子个数的最小堆,当队列中元素超过梯子个数,便将队首最小值出队,出队的这个楼与楼的差距用砖头填补。所有砖头用完了,即是可以到达的最远楼号。 + +## 代码 + +```go +package leetcode + +import ( + "container/heap" +) + +func furthestBuilding(heights []int, bricks int, ladder int) int { + usedLadder := &heightDiffPQ{} + for i := 1; i < len(heights); i++ { + needbricks := heights[i] - heights[i-1] + if needbricks < 0 { + continue + } + if ladder > 0 { + heap.Push(usedLadder, needbricks) + ladder-- + } else { + if len(*usedLadder) > 0 && needbricks > (*usedLadder)[0] { + needbricks, (*usedLadder)[0] = (*usedLadder)[0], needbricks + heap.Fix(usedLadder, 0) + } + if bricks -= needbricks; bricks < 0 { + return i - 1 + } + } + } + return len(heights) - 1 +} + +type heightDiffPQ []int + +func (pq heightDiffPQ) Len() int { return len(pq) } +func (pq heightDiffPQ) Less(i, j int) bool { return pq[i] < pq[j] } +func (pq heightDiffPQ) Swap(i, j int) { pq[i], pq[j] = pq[j], pq[i] } +func (pq *heightDiffPQ) Push(x interface{}) { *pq = append(*pq, x.(int)) } +func (pq *heightDiffPQ) Pop() interface{} { + x := (*pq)[len(*pq)-1] + *pq = (*pq)[:len(*pq)-1] + return x +} +``` \ No newline at end of file diff --git a/website/content/ChapterFour/0900~0999/0933.Number-of-Recent-Calls.md b/website/content/ChapterFour/0900~0999/0933.Number-of-Recent-Calls.md index 5067df81..a5b0005a 100644 --- a/website/content/ChapterFour/0900~0999/0933.Number-of-Recent-Calls.md +++ b/website/content/ChapterFour/0900~0999/0933.Number-of-Recent-Calls.md @@ -77,5 +77,5 @@ func (this *RecentCounter) Ping(t int) int { ----------------------------------------------

⬅️上一页

-

下一页➡️

+

下一页➡️

diff --git a/website/content/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md b/website/content/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md new file mode 100644 index 00000000..86160767 --- /dev/null +++ b/website/content/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md @@ -0,0 +1,87 @@ +# [938. Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/) + + +## 题目 + +Given the `root` node of a binary search tree, return *the sum of values of all nodes with a value in the range `[low, high]`*. + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/11/05/bst1.jpg](https://assets.leetcode.com/uploads/2020/11/05/bst1.jpg) + +``` +Input: root = [10,5,15,3,7,null,18], low = 7, high = 15 +Output: 32 + +``` + +**Example 2:** + +![https://assets.leetcode.com/uploads/2020/11/05/bst2.jpg](https://assets.leetcode.com/uploads/2020/11/05/bst2.jpg) + +``` +Input: root = [10,5,15,3,7,13,18,1,null,6], low = 6, high = 10 +Output: 23 + +``` + +**Constraints:** + +- The number of nodes in the tree is in the range `[1, 2 * 10^4]`. +- `1 <= Node.val <= 10^5` +- `1 <= low <= high <= 10^5` +- All `Node.val` are **unique**. + +## 题目大意 + +给定二叉搜索树的根结点 root,返回值位于范围 [low, high] 之间的所有结点的值的和。 + +## 解题思路 + +- 简单题。因为二叉搜索树的有序性,先序遍历即为有序。遍历过程中判断节点值是否位于区间范围内,在区间内就累加,不在区间内节点就不管。最终输出累加和。 + +## 代码 + +```go +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/structures" +) + +// TreeNode define +type TreeNode = structures.TreeNode + +/** + * Definition for a binary tree node. + * type TreeNode struct { + * Val int + * Left *TreeNode + * Right *TreeNode + * } + */ + +func rangeSumBST(root *TreeNode, low int, high int) int { + res := 0 + preOrder(root, low, high, &res) + return res +} + +func preOrder(root *TreeNode, low, high int, res *int) { + if root == nil { + return + } + if low <= root.Val && root.Val <= high { + *res += root.Val + } + preOrder(root.Left, low, high, res) + preOrder(root.Right, low, high, res) +} +``` + + +---------------------------------------------- +
+

⬅️上一页

+

下一页➡️

+
diff --git a/website/content/ChapterFour/0900~0999/0942.DI-String-Match.md b/website/content/ChapterFour/0900~0999/0942.DI-String-Match.md index ae0835b0..ccc5bfa5 100755 --- a/website/content/ChapterFour/0900~0999/0942.DI-String-Match.md +++ b/website/content/ChapterFour/0900~0999/0942.DI-String-Match.md @@ -75,6 +75,6 @@ func diStringMatch(S string) []int { ----------------------------------------------
-

⬅️上一页

+

⬅️上一页

下一页➡️

diff --git a/website/content/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md b/website/content/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md index 88f0b709..3967392c 100644 --- a/website/content/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md +++ b/website/content/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md @@ -93,5 +93,5 @@ func countVowelStrings1(n int) int { ----------------------------------------------

⬅️上一页

-

下一页➡️

+

下一页➡️

diff --git a/website/content/ChapterFour/1600~1699/1642.Furthest-Building-You-Can-Reach.md b/website/content/ChapterFour/1600~1699/1642.Furthest-Building-You-Can-Reach.md new file mode 100644 index 00000000..25a33074 --- /dev/null +++ b/website/content/ChapterFour/1600~1699/1642.Furthest-Building-You-Can-Reach.md @@ -0,0 +1,120 @@ +# [1642. Furthest Building You Can Reach](https://leetcode.com/problems/furthest-building-you-can-reach/) + + +## 题目 + +You are given an integer array `heights` representing the heights of buildings, some `bricks`, and some `ladders`. + +You start your journey from building `0` and move to the next building by possibly using bricks or ladders. + +While moving from building `i` to building `i+1` (**0-indexed**), + +- If the current building's height is **greater than or equal** to the next building's height, you do **not** need a ladder or bricks. +- If the current building's height is **less than** the next building's height, you can either use **one ladder** or `(h[i+1] - h[i])` **bricks**. + +*Return the furthest building index (0-indexed) you can reach if you use the given ladders and bricks optimally.* + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/10/27/q4.gif](https://assets.leetcode.com/uploads/2020/10/27/q4.gif) + +``` +Input: heights = [4,2,7,6,9,14,12], bricks = 5, ladders = 1 +Output: 4 +Explanation: Starting at building 0, you can follow these steps: +- Go to building 1 without using ladders nor bricks since 4 >= 2. +- Go to building 2 using 5 bricks. You must use either bricks or ladders because 2 < 7. +- Go to building 3 without using ladders nor bricks since 7 >= 6. +- Go to building 4 using your only ladder. You must use either bricks or ladders because 6 < 9. +It is impossible to go beyond building 4 because you do not have any more bricks or ladders. + +``` + +**Example 2:** + +``` +Input: heights = [4,12,2,7,3,18,20,3,19], bricks = 10, ladders = 2 +Output: 7 + +``` + +**Example 3:** + +``` +Input: heights = [14,3,19,3], bricks = 17, ladders = 0 +Output: 3 + +``` + +**Constraints:** + +- `1 <= heights.length <= 10^5` +- `1 <= heights[i] <= 10^6` +- `0 <= bricks <= 10^9` +- `0 <= ladders <= heights.length` + +## 题目大意 + +给你一个整数数组 heights ,表示建筑物的高度。另有一些砖块 bricks 和梯子 ladders 。你从建筑物 0 开始旅程,不断向后面的建筑物移动,期间可能会用到砖块或梯子。当从建筑物 i 移动到建筑物 i+1(下标 从 0 开始 )时: + +- 如果当前建筑物的高度 大于或等于 下一建筑物的高度,则不需要梯子或砖块。 +- 如果当前建筑的高度 小于 下一个建筑的高度,您可以使用 一架梯子 或 (h[i+1] - h[i]) 个砖块 + +如果以最佳方式使用给定的梯子和砖块,返回你可以到达的最远建筑物的下标(下标 从 0 开始 )。 + +## 解题思路 + +- 这一题可能会想到贪心算法。梯子很厉害,可以无限长,所以梯子用来跨越最高的楼。遇到非最高的距离差,先用砖头。这样贪心的话不正确。例如,[1, 5, 1, 2, 3, 4, 10000] 这组数据,梯子有 1 个,4 块砖头。最大的差距在 10000 和 4 之间,贪心选择在此处用梯子。但是砖头不足以让我们走到最后两栋楼。贪心得到的结果是 3,正确的结果是 5,先用梯子,再用砖头走过 3,4,5 号楼。 +- 上面的贪心解法错误在于没有“动态”的贪心,使用梯子应该选择能爬过楼里面最高的 2 个。于是顺理成章的想到了优先队列。维护一个长度为梯子个数的最小堆,当队列中元素超过梯子个数,便将队首最小值出队,出队的这个楼与楼的差距用砖头填补。所有砖头用完了,即是可以到达的最远楼号。 + +## 代码 + +```go +package leetcode + +import ( + "container/heap" +) + +func furthestBuilding(heights []int, bricks int, ladder int) int { + usedLadder := &heightDiffPQ{} + for i := 1; i < len(heights); i++ { + needbricks := heights[i] - heights[i-1] + if needbricks < 0 { + continue + } + if ladder > 0 { + heap.Push(usedLadder, needbricks) + ladder-- + } else { + if len(*usedLadder) > 0 && needbricks > (*usedLadder)[0] { + needbricks, (*usedLadder)[0] = (*usedLadder)[0], needbricks + heap.Fix(usedLadder, 0) + } + if bricks -= needbricks; bricks < 0 { + return i - 1 + } + } + } + return len(heights) - 1 +} + +type heightDiffPQ []int + +func (pq heightDiffPQ) Len() int { return len(pq) } +func (pq heightDiffPQ) Less(i, j int) bool { return pq[i] < pq[j] } +func (pq heightDiffPQ) Swap(i, j int) { pq[i], pq[j] = pq[j], pq[i] } +func (pq *heightDiffPQ) Push(x interface{}) { *pq = append(*pq, x.(int)) } +func (pq *heightDiffPQ) Pop() interface{} { + x := (*pq)[len(*pq)-1] + *pq = (*pq)[:len(*pq)-1] + return x +} +``` + + +---------------------------------------------- +
+

⬅️上一页

+

下一页➡️

+
diff --git a/website/content/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md b/website/content/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md index 0c91d006..05c63906 100644 --- a/website/content/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md +++ b/website/content/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md @@ -98,6 +98,6 @@ func getMaximumGenerated(n int) int { ----------------------------------------------
-

⬅️上一页

+

⬅️上一页

下一页➡️

diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index 82a81ca4..85cf4957 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -11,11 +11,11 @@ weight: 1 |0001|Two Sum|[Go]({{< relref "/ChapterFour/0001~0099/0001.Two-Sum.md" >}})|Easy| O(n)| O(n)||46.8%| |0004|Median of Two Sorted Arrays|[Go]({{< relref "/ChapterFour/0001~0099/0004.Median-of-Two-Sorted-Arrays.md" >}})|Hard||||31.5%| |0011|Container With Most Water|[Go]({{< relref "/ChapterFour/0001~0099/0011.Container-With-Most-Water.md" >}})|Medium| O(n)| O(1)||52.9%| -|0015|3Sum|[Go]({{< relref "/ChapterFour/0001~0099/0015.3Sum.md" >}})|Medium| O(n^2)| O(n)|❤️|28.3%| +|0015|3Sum|[Go]({{< relref "/ChapterFour/0001~0099/0015.3Sum.md" >}})|Medium| O(n^2)| O(n)|❤️|28.4%| |0016|3Sum Closest|[Go]({{< relref "/ChapterFour/0001~0099/0016.3Sum-Closest.md" >}})|Medium| O(n^2)| O(1)|❤️|46.4%| |0018|4Sum|[Go]({{< relref "/ChapterFour/0001~0099/0018.4Sum.md" >}})|Medium| O(n^3)| O(n^2)|❤️|35.2%| |0026|Remove Duplicates from Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0026.Remove-Duplicates-from-Sorted-Array.md" >}})|Easy| O(n)| O(1)||46.9%| -|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.5%| +|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.6%| |0031|Next Permutation|[Go]({{< relref "/ChapterFour/0001~0099/0031.Next-Permutation.md" >}})|Medium||||33.9%| |0033|Search in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0033.Search-in-Rotated-Sorted-Array.md" >}})|Medium||||36.2%| |0034|Find First and Last Position of Element in Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0034.Find-First-and-Last-Position-of-Element-in-Sorted-Array.md" >}})|Medium||||37.6%| @@ -23,21 +23,21 @@ weight: 1 |0039|Combination Sum|[Go]({{< relref "/ChapterFour/0001~0099/0039.Combination-Sum.md" >}})|Medium| O(n log n)| O(n)||59.9%| |0040|Combination Sum II|[Go]({{< relref "/ChapterFour/0001~0099/0040.Combination-Sum-II.md" >}})|Medium| O(n log n)| O(n)||50.5%| |0041|First Missing Positive|[Go]({{< relref "/ChapterFour/0001~0099/0041.First-Missing-Positive.md" >}})|Hard| O(n)| O(n)||34.1%| -|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.7%| +|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.8%| |0045|Jump Game II|[Go]({{< relref "/ChapterFour/0001~0099/0045.Jump-Game-II.md" >}})|Medium||||31.8%| -|0048|Rotate Image|[Go]({{< relref "/ChapterFour/0001~0099/0048.Rotate-Image.md" >}})|Medium| O(n)| O(1)||61.0%| +|0048|Rotate Image|[Go]({{< relref "/ChapterFour/0001~0099/0048.Rotate-Image.md" >}})|Medium| O(n)| O(1)||61.2%| |0053|Maximum Subarray|[Go]({{< relref "/ChapterFour/0001~0099/0053.Maximum-Subarray.md" >}})|Easy| O(n)| O(n)||47.9%| |0054|Spiral Matrix|[Go]({{< relref "/ChapterFour/0001~0099/0054.Spiral-Matrix.md" >}})|Medium| O(n)| O(n^2)||36.7%| |0055|Jump Game|[Go]({{< relref "/ChapterFour/0001~0099/0055.Jump-Game.md" >}})|Medium||||35.3%| |0056|Merge Intervals|[Go]({{< relref "/ChapterFour/0001~0099/0056.Merge-Intervals.md" >}})|Medium| O(n log n)| O(1)||41.5%| |0057|Insert Interval|[Go]({{< relref "/ChapterFour/0001~0099/0057.Insert-Interval.md" >}})|Medium| O(n)| O(1)||35.4%| -|0059|Spiral Matrix II|[Go]({{< relref "/ChapterFour/0001~0099/0059.Spiral-Matrix-II.md" >}})|Medium| O(n)| O(n^2)||58.3%| -|0062|Unique Paths|[Go]({{< relref "/ChapterFour/0001~0099/0062.Unique-Paths.md" >}})|Medium| O(n^2)| O(n^2)||56.4%| +|0059|Spiral Matrix II|[Go]({{< relref "/ChapterFour/0001~0099/0059.Spiral-Matrix-II.md" >}})|Medium| O(n)| O(n^2)||58.4%| +|0062|Unique Paths|[Go]({{< relref "/ChapterFour/0001~0099/0062.Unique-Paths.md" >}})|Medium| O(n^2)| O(n^2)||56.5%| |0063|Unique Paths II|[Go]({{< relref "/ChapterFour/0001~0099/0063.Unique-Paths-II.md" >}})|Medium| O(n^2)| O(n^2)||35.4%| |0064|Minimum Path Sum|[Go]({{< relref "/ChapterFour/0001~0099/0064.Minimum-Path-Sum.md" >}})|Medium| O(n^2)| O(n^2)||56.6%| |0066|Plus One|[Go]({{< relref "/ChapterFour/0001~0099/0066.Plus-One.md" >}})|Easy||||42.2%| |0073|Set Matrix Zeroes|[Go]({{< relref "/ChapterFour/0001~0099/0073.Set-Matrix-Zeroes.md" >}})|Medium||||44.7%| -|0074|Search a 2D Matrix|[Go]({{< relref "/ChapterFour/0001~0099/0074.Search-a-2D-Matrix.md" >}})|Medium||||38.2%| +|0074|Search a 2D Matrix|[Go]({{< relref "/ChapterFour/0001~0099/0074.Search-a-2D-Matrix.md" >}})|Medium||||38.3%| |0075|Sort Colors|[Go]({{< relref "/ChapterFour/0001~0099/0075.Sort-Colors.md" >}})|Medium| O(n)| O(1)|❤️|50.0%| |0078|Subsets|[Go]({{< relref "/ChapterFour/0001~0099/0078.Subsets.md" >}})|Medium| O(n^2)| O(n)|❤️|65.8%| |0079|Word Search|[Go]({{< relref "/ChapterFour/0001~0099/0079.Word-Search.md" >}})|Medium| O(n^2)| O(n^2)|❤️|37.3%| @@ -72,7 +72,7 @@ weight: 1 |0283|Move Zeroes|[Go]({{< relref "/ChapterFour/0200~0299/0283.Move-Zeroes.md" >}})|Easy| O(n)| O(1)||58.7%| |0287|Find the Duplicate Number|[Go]({{< relref "/ChapterFour/0200~0299/0287.Find-the-Duplicate-Number.md" >}})|Medium| O(n)| O(1)|❤️|58.0%| |0414|Third Maximum Number|[Go]({{< relref "/ChapterFour/0400~0499/0414.Third-Maximum-Number.md" >}})|Easy||||30.8%| -|0448|Find All Numbers Disappeared in an Array|[Go]({{< relref "/ChapterFour/0400~0499/0448.Find-All-Numbers-Disappeared-in-an-Array.md" >}})|Easy||||56.2%| +|0448|Find All Numbers Disappeared in an Array|[Go]({{< relref "/ChapterFour/0400~0499/0448.Find-All-Numbers-Disappeared-in-an-Array.md" >}})|Easy||||56.3%| |0457|Circular Array Loop|[Go]({{< relref "/ChapterFour/0400~0499/0457.Circular-Array-Loop.md" >}})|Medium||||30.4%| |0485|Max Consecutive Ones|[Go]({{< relref "/ChapterFour/0400~0499/0485.Max-Consecutive-Ones.md" >}})|Easy||||52.7%| |0509|Fibonacci Number|[Go]({{< relref "/ChapterFour/0500~0599/0509.Fibonacci-Number.md" >}})|Easy||||67.9%| @@ -94,7 +94,7 @@ weight: 1 |0717|1-bit and 2-bit Characters|[Go]({{< relref "/ChapterFour/0700~0799/0717.1-bit-and-2-bit-Characters.md" >}})|Easy||||46.8%| |0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||50.6%| |0719|Find K-th Smallest Pair Distance|[Go]({{< relref "/ChapterFour/0700~0799/0719.Find-K-th-Smallest-Pair-Distance.md" >}})|Hard||||32.7%| -|0724|Find Pivot Index|[Go]({{< relref "/ChapterFour/0700~0799/0724.Find-Pivot-Index.md" >}})|Easy||||46.3%| +|0724|Find Pivot Index|[Go]({{< relref "/ChapterFour/0700~0799/0724.Find-Pivot-Index.md" >}})|Easy||||46.4%| |0729|My Calendar I|[Go]({{< relref "/ChapterFour/0700~0799/0729.My-Calendar-I.md" >}})|Medium||||53.7%| |0746|Min Cost Climbing Stairs|[Go]({{< relref "/ChapterFour/0700~0799/0746.Min-Cost-Climbing-Stairs.md" >}})|Easy| O(n)| O(1)||51.2%| |0766|Toeplitz Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0766.Toeplitz-Matrix.md" >}})|Easy| O(n)| O(1)||66.0%| @@ -102,7 +102,7 @@ weight: 1 |0830|Positions of Large Groups|[Go]({{< relref "/ChapterFour/0800~0899/0830.Positions-of-Large-Groups.md" >}})|Easy||||50.5%| |0832|Flipping an Image|[Go]({{< relref "/ChapterFour/0800~0899/0832.Flipping-an-Image.md" >}})|Easy||||78.4%| |0867|Transpose Matrix|[Go]({{< relref "/ChapterFour/0800~0899/0867.Transpose-Matrix.md" >}})|Easy| O(n)| O(1)||61.9%| -|0870|Advantage Shuffle|[Go]({{< relref "/ChapterFour/0800~0899/0870.Advantage-Shuffle.md" >}})|Medium||||50.7%| +|0870|Advantage Shuffle|[Go]({{< relref "/ChapterFour/0800~0899/0870.Advantage-Shuffle.md" >}})|Medium||||50.8%| |0888|Fair Candy Swap|[Go]({{< relref "/ChapterFour/0800~0899/0888.Fair-Candy-Swap.md" >}})|Easy||||59.2%| |0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0800~0899/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||33.2%| |0896|Monotonic Array|[Go]({{< relref "/ChapterFour/0800~0899/0896.Monotonic-Array.md" >}})|Easy||||57.9%| @@ -114,9 +114,9 @@ weight: 1 |0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0900~0999/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||71.8%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.7%| |0985|Sum of Even Numbers After Queries|[Go]({{< relref "/ChapterFour/0900~0999/0985.Sum-of-Even-Numbers-After-Queries.md" >}})|Easy||||60.6%| -|0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0900~0999/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||45.0%| +|0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0900~0999/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||44.9%| |0999|Available Captures for Rook|[Go]({{< relref "/ChapterFour/0900~0999/0999.Available-Captures-for-Rook.md" >}})|Easy||||67.7%| -|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.6%| +|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.7%| |1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1000~1099/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||60.0%| |1018|Binary Prefix Divisible By 5|[Go]({{< relref "/ChapterFour/1000~1099/1018.Binary-Prefix-Divisible-By-5.md" >}})|Easy||||47.7%| |1040|Moving Stones Until Consecutive II|[Go]({{< relref "/ChapterFour/1000~1099/1040.Moving-Stones-Until-Consecutive-II.md" >}})|Medium||||54.3%| @@ -129,11 +129,11 @@ weight: 1 |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||41.0%| |1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1100~1199/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.9%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1100~1199/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||60.4%| -|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1100~1199/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||53.8%| +|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1100~1199/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||53.9%| |1185|Day of the Week|[Go]({{< relref "/ChapterFour/1100~1199/1185.Day-of-the-Week.md" >}})|Easy||||61.0%| |1200|Minimum Absolute Difference|[Go]({{< relref "/ChapterFour/1200~1299/1200.Minimum-Absolute-Difference.md" >}})|Easy||||67.1%| |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||49.1%| -|1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.3%| +|1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.4%| |1217|Minimum Cost to Move Chips to The Same Position|[Go]({{< relref "/ChapterFour/1200~1299/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position.md" >}})|Easy||||70.9%| |1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1200~1299/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.1%| |1252|Cells with Odd Values in a Matrix|[Go]({{< relref "/ChapterFour/1200~1299/1252.Cells-with-Odd-Values-in-a-Matrix.md" >}})|Easy||||78.6%| @@ -147,7 +147,7 @@ weight: 1 |1304|Find N Unique Integers Sum up to Zero|[Go]({{< relref "/ChapterFour/1300~1399/1304.Find-N-Unique-Integers-Sum-up-to-Zero.md" >}})|Easy||||76.7%| |1313|Decompress Run-Length Encoded List|[Go]({{< relref "/ChapterFour/1300~1399/1313.Decompress-Run-Length-Encoded-List.md" >}})|Easy||||85.4%| |1329|Sort the Matrix Diagonally|[Go]({{< relref "/ChapterFour/1300~1399/1329.Sort-the-Matrix-Diagonally.md" >}})|Medium||||81.6%| -|1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.1%| +|1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.0%| |1380|Lucky Numbers in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1380.Lucky-Numbers-in-a-Matrix.md" >}})|Easy||||70.4%| |1385|Find the Distance Value Between Two Arrays|[Go]({{< relref "/ChapterFour/1300~1399/1385.Find-the-Distance-Value-Between-Two-Arrays.md" >}})|Easy||||66.5%| |1389|Create Target Array in the Given Order|[Go]({{< relref "/ChapterFour/1300~1399/1389.Create-Target-Array-in-the-Given-Order.md" >}})|Easy||||84.9%| @@ -161,19 +161,19 @@ weight: 1 |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1500~1599/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||54.8%| |1608|Special Array With X Elements Greater Than or Equal X|[Go]({{< relref "/ChapterFour/1600~1699/1608.Special-Array-With-X-Elements-Greater-Than-or-Equal-X.md" >}})|Easy||||61.4%| |1619|Mean of Array After Removing Some Elements|[Go]({{< relref "/ChapterFour/1600~1699/1619.Mean-of-Array-After-Removing-Some-Elements.md" >}})|Easy||||64.5%| -|1629|Slowest Key|[Go]({{< relref "/ChapterFour/1600~1699/1629.Slowest-Key.md" >}})|Easy||||59.1%| +|1629|Slowest Key|[Go]({{< relref "/ChapterFour/1600~1699/1629.Slowest-Key.md" >}})|Easy||||59.2%| |1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||67.0%| |1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1600~1699/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||59.7%| |1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.1%| -|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1600~1699/1652.Defuse-the-Bomb.md" >}})|Easy||||61.7%| -|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1600~1699/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.0%| +|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1600~1699/1652.Defuse-the-Bomb.md" >}})|Easy||||61.6%| +|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1600~1699/1656.Design-an-Ordered-Stream.md" >}})|Easy||||81.9%| |1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1600~1699/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.2%| |1700|Number of Students Unable to Eat Lunch|[Go]({{< relref "/ChapterFour/1700~1799/1700.Number-of-Students-Unable-to-Eat-Lunch.md" >}})|Easy||||67.6%| -|1732|Find the Highest Altitude|[Go]({{< relref "/ChapterFour/1700~1799/1732.Find-the-Highest-Altitude.md" >}})|Easy||||79.8%| -|1742|Maximum Number of Balls in a Box|[Go]({{< relref "/ChapterFour/1700~1799/1742.Maximum-Number-of-Balls-in-a-Box.md" >}})|Easy||||73.6%| +|1732|Find the Highest Altitude|[Go]({{< relref "/ChapterFour/1700~1799/1732.Find-the-Highest-Altitude.md" >}})|Easy||||79.7%| +|1742|Maximum Number of Balls in a Box|[Go]({{< relref "/ChapterFour/1700~1799/1742.Maximum-Number-of-Balls-in-a-Box.md" >}})|Easy||||73.5%| |1748|Sum of Unique Elements|[Go]({{< relref "/ChapterFour/1700~1799/1748.Sum-of-Unique-Elements.md" >}})|Easy||||74.7%| -|1752|Check if Array Is Sorted and Rotated|[Go]({{< relref "/ChapterFour/1700~1799/1752.Check-if-Array-Is-Sorted-and-Rotated.md" >}})|Easy||||60.1%| -|1758|Minimum Changes To Make Alternating Binary String|[Go]({{< relref "/ChapterFour/1700~1799/1758.Minimum-Changes-To-Make-Alternating-Binary-String.md" >}})|Easy||||58.1%| +|1752|Check if Array Is Sorted and Rotated|[Go]({{< relref "/ChapterFour/1700~1799/1752.Check-if-Array-Is-Sorted-and-Rotated.md" >}})|Easy||||60.0%| +|1758|Minimum Changes To Make Alternating Binary String|[Go]({{< relref "/ChapterFour/1700~1799/1758.Minimum-Changes-To-Make-Alternating-Binary-String.md" >}})|Easy||||58.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index b9c65e6c..72cf31da 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -117,24 +117,24 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0090|Subsets II|[Go]({{< relref "/ChapterFour/0001~0099/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|49.3%| |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0001~0099/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|38.0%| |0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|52.8%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|52.9%| |0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0200~0299/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium| O(n)| O(n)|❤️|40.7%| |0212|Word Search II|[Go]({{< relref "/ChapterFour/0200~0299/0212.Word-Search-II.md" >}})|Hard| O(n^2)| O(n^2)|❤️|37.6%| |0216|Combination Sum III|[Go]({{< relref "/ChapterFour/0200~0299/0216.Combination-Sum-III.md" >}})|Medium| O(n)| O(1)|❤️|60.8%| |0306|Additive Number|[Go]({{< relref "/ChapterFour/0300~0399/0306.Additive-Number.md" >}})|Medium| O(n^2)| O(1)|❤️|29.8%| |0357|Count Numbers with Unique Digits|[Go]({{< relref "/ChapterFour/0300~0399/0357.Count-Numbers-with-Unique-Digits.md" >}})|Medium| O(1)| O(1)||49.0%| -|0401|Binary Watch|[Go]({{< relref "/ChapterFour/0400~0499/0401.Binary-Watch.md" >}})|Easy| O(1)| O(1)||48.6%| +|0401|Binary Watch|[Go]({{< relref "/ChapterFour/0400~0499/0401.Binary-Watch.md" >}})|Easy| O(1)| O(1)||48.7%| |0526|Beautiful Arrangement|[Go]({{< relref "/ChapterFour/0500~0599/0526.Beautiful-Arrangement.md" >}})|Medium| O(n^2)| O(1)|❤️|62.2%| |0784|Letter Case Permutation|[Go]({{< relref "/ChapterFour/0700~0799/0784.Letter-Case-Permutation.md" >}})|Medium| O(n)| O(n)||68.9%| |0842|Split Array into Fibonacci Sequence|[Go]({{< relref "/ChapterFour/0800~0899/0842.Split-Array-into-Fibonacci-Sequence.md" >}})|Medium| O(n^2)| O(1)|❤️|37.0%| |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.1%| |0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.6%| |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|76.0%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.5%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.4%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.0%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.6%| -|1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}})|Hard||||35.8%| -|1688|Count of Matches in Tournament|[Go]({{< relref "/ChapterFour/1600~1699/1688.Count-of-Matches-in-Tournament.md" >}})|Easy||||81.4%| +|1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}})|Hard||||35.9%| +|1688|Count of Matches in Tournament|[Go]({{< relref "/ChapterFour/1600~1699/1688.Count-of-Matches-in-Tournament.md" >}})|Easy||||81.5%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Binary_Search.md b/website/content/ChapterTwo/Binary_Search.md index fb77a6f8..744f8d25 100644 --- a/website/content/ChapterTwo/Binary_Search.md +++ b/website/content/ChapterTwo/Binary_Search.md @@ -138,7 +138,7 @@ func peakIndexInMountainArray(A []int) int { |0035|Search Insert Position|[Go]({{< relref "/ChapterFour/0001~0099/0035.Search-Insert-Position.md" >}})|Easy||||42.9%| |0050|Pow(x, n)|[Go]({{< relref "/ChapterFour/0001~0099/0050.Powx-n.md" >}})|Medium| O(log n)| O(1)||31.1%| |0069|Sqrt(x)|[Go]({{< relref "/ChapterFour/0001~0099/0069.Sqrtx.md" >}})|Easy| O(log n)| O(1)||35.5%| -|0074|Search a 2D Matrix|[Go]({{< relref "/ChapterFour/0001~0099/0074.Search-a-2D-Matrix.md" >}})|Medium||||38.2%| +|0074|Search a 2D Matrix|[Go]({{< relref "/ChapterFour/0001~0099/0074.Search-a-2D-Matrix.md" >}})|Medium||||38.3%| |0081|Search in Rotated Sorted Array II|[Go]({{< relref "/ChapterFour/0001~0099/0081.Search-in-Rotated-Sorted-Array-II.md" >}})|Medium||||33.7%| |0153|Find Minimum in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0100~0199/0153.Find-Minimum-in-Rotated-Sorted-Array.md" >}})|Medium||||46.5%| |0154|Find Minimum in Rotated Sorted Array II|[Go]({{< relref "/ChapterFour/0100~0199/0154.Find-Minimum-in-Rotated-Sorted-Array-II.md" >}})|Hard||||42.2%| @@ -157,7 +157,7 @@ func peakIndexInMountainArray(A []int) int { |0349|Intersection of Two Arrays|[Go]({{< relref "/ChapterFour/0300~0399/0349.Intersection-of-Two-Arrays.md" >}})|Easy| O(n)| O(n) ||65.5%| |0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||52.2%| |0354|Russian Doll Envelopes|[Go]({{< relref "/ChapterFour/0300~0399/0354.Russian-Doll-Envelopes.md" >}})|Hard||||37.8%| -|0367|Valid Perfect Square|[Go]({{< relref "/ChapterFour/0300~0399/0367.Valid-Perfect-Square.md" >}})|Easy||||42.2%| +|0367|Valid Perfect Square|[Go]({{< relref "/ChapterFour/0300~0399/0367.Valid-Perfect-Square.md" >}})|Easy||||42.3%| |0378|Kth Smallest Element in a Sorted Matrix|[Go]({{< relref "/ChapterFour/0300~0399/0378.Kth-Smallest-Element-in-a-Sorted-Matrix.md" >}})|Medium||||56.6%| |0392|Is Subsequence|[Go]({{< relref "/ChapterFour/0300~0399/0392.Is-Subsequence.md" >}})|Easy| O(n)| O(1)||49.6%| |0410|Split Array Largest Sum|[Go]({{< relref "/ChapterFour/0400~0499/0410.Split-Array-Largest-Sum.md" >}})|Hard||||46.8%| @@ -176,16 +176,16 @@ func peakIndexInMountainArray(A []int) int { |0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0700~0799/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||50.6%| |0719|Find K-th Smallest Pair Distance|[Go]({{< relref "/ChapterFour/0700~0799/0719.Find-K-th-Smallest-Pair-Distance.md" >}})|Hard||||32.7%| |0744|Find Smallest Letter Greater Than Target|[Go]({{< relref "/ChapterFour/0700~0799/0744.Find-Smallest-Letter-Greater-Than-Target.md" >}})|Easy||||45.6%| -|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||55.0%| -|0786|K-th Smallest Prime Fraction|[Go]({{< relref "/ChapterFour/0700~0799/0786.K-th-Smallest-Prime-Fraction.md" >}})|Hard||||43.6%| -|0793|Preimage Size of Factorial Zeroes Function|[Go]({{< relref "/ChapterFour/0700~0799/0793.Preimage-Size-of-Factorial-Zeroes-Function.md" >}})|Hard||||40.6%| +|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||55.1%| +|0786|K-th Smallest Prime Fraction|[Go]({{< relref "/ChapterFour/0700~0799/0786.K-th-Smallest-Prime-Fraction.md" >}})|Hard||||43.7%| +|0793|Preimage Size of Factorial Zeroes Function|[Go]({{< relref "/ChapterFour/0700~0799/0793.Preimage-Size-of-Factorial-Zeroes-Function.md" >}})|Hard||||40.7%| |0852|Peak Index in a Mountain Array|[Go]({{< relref "/ChapterFour/0800~0899/0852.Peak-Index-in-a-Mountain-Array.md" >}})|Easy||||71.8%| |0862|Shortest Subarray with Sum at Least K|[Go]({{< relref "/ChapterFour/0800~0899/0862.Shortest-Subarray-with-Sum-at-Least-K.md" >}})|Hard||||25.3%| |0875|Koko Eating Bananas|[Go]({{< relref "/ChapterFour/0800~0899/0875.Koko-Eating-Bananas.md" >}})|Medium||||53.5%| |0878|Nth Magical Number|[Go]({{< relref "/ChapterFour/0800~0899/0878.Nth-Magical-Number.md" >}})|Hard||||28.9%| |0887|Super Egg Drop|[Go]({{< relref "/ChapterFour/0800~0899/0887.Super-Egg-Drop.md" >}})|Hard||||27.0%| |0911|Online Election|[Go]({{< relref "/ChapterFour/0900~0999/0911.Online-Election.md" >}})|Medium||||51.5%| -|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0900~0999/0927.Three-Equal-Parts.md" >}})|Hard||||34.6%| +|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0900~0999/0927.Three-Equal-Parts.md" >}})|Hard||||34.7%| |0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0900~0999/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||54.3%| |1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1000~1099/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||60.0%| |1111|Maximum Nesting Depth of Two Valid Parentheses Strings|[Go]({{< relref "/ChapterFour/1100~1199/1111.Maximum-Nesting-Depth-of-Two-Valid-Parentheses-Strings.md" >}})|Medium||||72.8%| @@ -195,14 +195,14 @@ func peakIndexInMountainArray(A []int) int { |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.8%| |1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1200~1299/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||50.0%| |1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300~1399/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.0%| -|1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.1%| +|1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.0%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| +|1642|Furthest Building You Can Reach|[Go]({{< relref "/ChapterFour/1600~1699/1642.Furthest-Building-You-Can-Reach.md" >}})|Medium||||47.3%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||36.7%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| - ----------------------------------------------

⬅️上一页

diff --git a/website/content/ChapterTwo/Bit_Manipulation.md b/website/content/ChapterTwo/Bit_Manipulation.md index 5beb7c35..5ecaecca 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -48,21 +48,21 @@ X & ~X = 0 |0136|Single Number|[Go]({{< relref "/ChapterFour/0100~0199/0136.Single-Number.md" >}})|Easy| O(n)| O(1)||66.8%| |0137|Single Number II|[Go]({{< relref "/ChapterFour/0100~0199/0137.Single-Number-II.md" >}})|Medium| O(n)| O(1)|❤️|54.2%| |0169|Majority Element|[Go]({{< relref "/ChapterFour/0100~0199/0169.Majority-Element.md" >}})|Easy| O(n)| O(1)|❤️|60.3%| -|0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0100~0199/0187.Repeated-DNA-Sequences.md" >}})|Medium| O(n)| O(1)||41.7%| +|0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0100~0199/0187.Repeated-DNA-Sequences.md" >}})|Medium| O(n)| O(1)||41.8%| |0190|Reverse Bits|[Go]({{< relref "/ChapterFour/0100~0199/0190.Reverse-Bits.md" >}})|Easy| O(n)| O(1)|❤️|42.8%| -|0191|Number of 1 Bits|[Go]({{< relref "/ChapterFour/0100~0199/0191.Number-of-1-Bits.md" >}})|Easy| O(n)| O(1)||54.4%| +|0191|Number of 1 Bits|[Go]({{< relref "/ChapterFour/0100~0199/0191.Number-of-1-Bits.md" >}})|Easy| O(n)| O(1)||54.5%| |0201|Bitwise AND of Numbers Range|[Go]({{< relref "/ChapterFour/0200~0299/0201.Bitwise-AND-of-Numbers-Range.md" >}})|Medium| O(n)| O(1)|❤️|39.7%| |0231|Power of Two|[Go]({{< relref "/ChapterFour/0200~0299/0231.Power-of-Two.md" >}})|Easy| O(1)| O(1)||43.8%| |0260|Single Number III|[Go]({{< relref "/ChapterFour/0200~0299/0260.Single-Number-III.md" >}})|Medium| O(n)| O(1)|❤️|65.5%| |0268|Missing Number|[Go]({{< relref "/ChapterFour/0200~0299/0268.Missing-Number.md" >}})|Easy| O(n)| O(1)||55.4%| -|0318|Maximum Product of Word Lengths|[Go]({{< relref "/ChapterFour/0300~0399/0318.Maximum-Product-of-Word-Lengths.md" >}})|Medium| O(n)| O(1)||52.5%| -|0338|Counting Bits|[Go]({{< relref "/ChapterFour/0300~0399/0338.Counting-Bits.md" >}})|Medium| O(n)| O(n)||70.6%| +|0318|Maximum Product of Word Lengths|[Go]({{< relref "/ChapterFour/0300~0399/0318.Maximum-Product-of-Word-Lengths.md" >}})|Medium| O(n)| O(1)||52.6%| +|0338|Counting Bits|[Go]({{< relref "/ChapterFour/0300~0399/0338.Counting-Bits.md" >}})|Medium| O(n)| O(n)||70.7%| |0342|Power of Four|[Go]({{< relref "/ChapterFour/0300~0399/0342.Power-of-Four.md" >}})|Easy| O(n)| O(1)||41.9%| |0371|Sum of Two Integers|[Go]({{< relref "/ChapterFour/0300~0399/0371.Sum-of-Two-Integers.md" >}})|Medium| O(n)| O(1)||50.6%| |0389|Find the Difference|[Go]({{< relref "/ChapterFour/0300~0399/0389.Find-the-Difference.md" >}})|Easy| O(n)| O(1)||58.0%| |0393|UTF-8 Validation|[Go]({{< relref "/ChapterFour/0300~0399/0393.UTF-8-Validation.md" >}})|Medium| O(n)| O(1)||38.2%| |0397|Integer Replacement|[Go]({{< relref "/ChapterFour/0300~0399/0397.Integer-Replacement.md" >}})|Medium| O(n)| O(1)||33.6%| -|0401|Binary Watch|[Go]({{< relref "/ChapterFour/0400~0499/0401.Binary-Watch.md" >}})|Easy| O(1)| O(1)||48.6%| +|0401|Binary Watch|[Go]({{< relref "/ChapterFour/0400~0499/0401.Binary-Watch.md" >}})|Easy| O(1)| O(1)||48.7%| |0405|Convert a Number to Hexadecimal|[Go]({{< relref "/ChapterFour/0400~0499/0405.Convert-a-Number-to-Hexadecimal.md" >}})|Easy| O(n)| O(1)||44.6%| |0421|Maximum XOR of Two Numbers in an Array|[Go]({{< relref "/ChapterFour/0400~0499/0421.Maximum-XOR-of-Two-Numbers-in-an-Array.md" >}})|Medium| O(n)| O(1)|❤️|54.4%| |0461|Hamming Distance|[Go]({{< relref "/ChapterFour/0400~0499/0461.Hamming-Distance.md" >}})|Easy| O(n)| O(1)||73.3%| @@ -75,8 +75,8 @@ X & ~X = 0 |0898|Bitwise ORs of Subarrays|[Go]({{< relref "/ChapterFour/0800~0899/0898.Bitwise-ORs-of-Subarrays.md" >}})|Medium| O(n)| O(1)||34.5%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.8%| |1290|Convert Binary Number in a Linked List to Integer|[Go]({{< relref "/ChapterFour/1200~1299/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer.md" >}})|Easy||||81.7%| -|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.3%| -|1720|Decode XORed Array|[Go]({{< relref "/ChapterFour/1700~1799/1720.Decode-XORed-Array.md" >}})|Easy||||85.2%| +|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.2%| +|1720|Decode XORed Array|[Go]({{< relref "/ChapterFour/1700~1799/1720.Decode-XORed-Array.md" >}})|Easy||||85.1%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Breadth_First_Search.md b/website/content/ChapterTwo/Breadth_First_Search.md index f7462065..665dc3ad 100644 --- a/website/content/ChapterTwo/Breadth_First_Search.md +++ b/website/content/ChapterTwo/Breadth_First_Search.md @@ -19,7 +19,7 @@ weight: 10 |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})|Medium||||29.9%| |0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.7%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||49.7%| -|0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| +|0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.4%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||43.1%| |0417|Pacific Atlantic Water Flow|[Go]({{< relref "/ChapterFour/0400~0499/0417.Pacific-Atlantic-Water-Flow.md" >}})|Medium||||44.2%| |0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0500~0599/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.9%| @@ -28,14 +28,14 @@ weight: 10 |0542|01 Matrix|[Go]({{< relref "/ChapterFour/0500~0599/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||41.2%| |0785|Is Graph Bipartite?|[Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}})|Medium||||48.8%| |0815|Bus Routes|[Go]({{< relref "/ChapterFour/0800~0899/0815.Bus-Routes.md" >}})|Hard||||43.6%| -|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.2%| -|0864|Shortest Path to Get All Keys|[Go]({{< relref "/ChapterFour/0800~0899/0864.Shortest-Path-to-Get-All-Keys.md" >}})|Hard||||42.4%| +|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.3%| +|0864|Shortest Path to Get All Keys|[Go]({{< relref "/ChapterFour/0800~0899/0864.Shortest-Path-to-Get-All-Keys.md" >}})|Hard||||42.5%| |0987|Vertical Order Traversal of a Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})|Hard||||39.1%| |0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |1091|Shortest Path in Binary Matrix|[Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}})|Medium||||40.2%| -|1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.2%| +|1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.1%| |1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.6%| -|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.0%| +|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||24.9%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index 7f656ce6..7117203f 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -21,19 +21,19 @@ weight: 9 |0109|Convert Sorted List to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0109.Convert-Sorted-List-to-Binary-Search-Tree.md" >}})|Medium| O(log n)| O(n)||50.8%| |0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.9%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.9%| -|0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.7%| +|0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.8%| |0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.7%| |0114|Flatten Binary Tree to Linked List|[Go]({{< relref "/ChapterFour/0100~0199/0114.Flatten-Binary-Tree-to-Linked-List.md" >}})|Medium| O(n)| O(1)||52.6%| |0124|Binary Tree Maximum Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0124.Binary-Tree-Maximum-Path-Sum.md" >}})|Hard| O(n)| O(1)||35.7%| -|0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.4%| +|0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.5%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})|Medium||||29.9%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium||||52.8%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium||||52.9%| |0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.7%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||49.7%| -|0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| +|0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.4%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||43.1%| |0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0200~0299/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium||||40.7%| -|0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0200~0299/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||54.2%| +|0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0200~0299/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||54.3%| |0329|Longest Increasing Path in a Matrix|[Go]({{< relref "/ChapterFour/0300~0399/0329.Longest-Increasing-Path-in-a-Matrix.md" >}})|Hard||||46.4%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.0%| |0394|Decode String|[Go]({{< relref "/ChapterFour/0300~0399/0394.Decode-String.md" >}})|Medium| O(n)| O(n)||53.1%| @@ -55,19 +55,20 @@ weight: 9 |0733|Flood Fill|[Go]({{< relref "/ChapterFour/0700~0799/0733.Flood-Fill.md" >}})|Easy||||56.0%| |0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0700~0799/0753.Cracking-the-Safe.md" >}})|Hard||||52.7%| |0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium||||55.7%| -|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||55.0%| +|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||55.1%| |0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.3%| |0785|Is Graph Bipartite?|[Go]({{< relref "/ChapterFour/0700~0799/0785.Is-Graph-Bipartite.md" >}})|Medium||||48.8%| |0802|Find Eventual Safe States|[Go]({{< relref "/ChapterFour/0800~0899/0802.Find-Eventual-Safe-States.md" >}})|Medium||||50.1%| -|0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||46.7%| +|0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||46.8%| |0839|Similar String Groups|[Go]({{< relref "/ChapterFour/0800~0899/0839.Similar-String-Groups.md" >}})|Hard||||41.8%| |0841|Keys and Rooms|[Go]({{< relref "/ChapterFour/0800~0899/0841.Keys-and-Rooms.md" >}})|Medium||||66.5%| |0851|Loud and Rich|[Go]({{< relref "/ChapterFour/0800~0899/0851.Loud-and-Rich.md" >}})|Medium||||52.9%| -|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.2%| +|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.3%| |0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0800~0899/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.5%| |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0800~0899/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.7%| |0924|Minimize Malware Spread|[Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}})|Hard||||41.9%| |0928|Minimize Malware Spread II|[Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}})|Hard||||41.5%| +|0938|Range Sum of BST|[Go]({{< relref "/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md" >}})|Easy||||83.3%| |0947|Most Stones Removed with Same Row or Column|[Go]({{< relref "/ChapterFour/0900~0999/0947.Most-Stones-Removed-with-Same-Row-or-Column.md" >}})|Medium||||55.7%| |0959|Regions Cut By Slashes|[Go]({{< relref "/ChapterFour/0900~0999/0959.Regions-Cut-By-Slashes.md" >}})|Medium||||67.2%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||39.0%| @@ -84,8 +85,8 @@ weight: 9 |1145|Binary Tree Coloring Game|[Go]({{< relref "/ChapterFour/1100~1199/1145.Binary-Tree-Coloring-Game.md" >}})|Medium||||51.2%| |1203|Sort Items by Groups Respecting Dependencies|[Go]({{< relref "/ChapterFour/1200~1299/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})|Hard||||48.4%| |1254|Number of Closed Islands|[Go]({{< relref "/ChapterFour/1200~1299/1254.Number-of-Closed-Islands.md" >}})|Medium||||62.0%| -|1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||85.5%| -|1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.2%| +|1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||85.4%| +|1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.1%| |1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.6%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Dynamic_Programming.md b/website/content/ChapterTwo/Dynamic_Programming.md index e189943e..1df6f8a1 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -11,9 +11,9 @@ weight: 7 |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0005|Longest Palindromic Substring|[Go]({{< relref "/ChapterFour/0001~0099/0005.Longest-Palindromic-Substring.md" >}})|Medium||||30.7%| |0032|Longest Valid Parentheses|[Go]({{< relref "/ChapterFour/0001~0099/0032.Longest-Valid-Parentheses.md" >}})|Hard||||29.9%| -|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard||||51.7%| +|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard||||51.8%| |0053|Maximum Subarray|[Go]({{< relref "/ChapterFour/0001~0099/0053.Maximum-Subarray.md" >}})|Easy| O(n)| O(n)||47.9%| -|0062|Unique Paths|[Go]({{< relref "/ChapterFour/0001~0099/0062.Unique-Paths.md" >}})|Medium| O(n^2)| O(n^2)||56.4%| +|0062|Unique Paths|[Go]({{< relref "/ChapterFour/0001~0099/0062.Unique-Paths.md" >}})|Medium| O(n^2)| O(n^2)||56.5%| |0063|Unique Paths II|[Go]({{< relref "/ChapterFour/0001~0099/0063.Unique-Paths-II.md" >}})|Medium| O(n^2)| O(n^2)||35.4%| |0064|Minimum Path Sum|[Go]({{< relref "/ChapterFour/0001~0099/0064.Minimum-Path-Sum.md" >}})|Medium| O(n^2)| O(n^2)||56.6%| |0070|Climbing Stairs|[Go]({{< relref "/ChapterFour/0001~0099/0070.Climbing-Stairs.md" >}})|Easy| O(n)| O(n)||48.8%| @@ -23,19 +23,19 @@ weight: 7 |0115|Distinct Subsequences|[Go]({{< relref "/ChapterFour/0100~0199/0115.Distinct-Subsequences.md" >}})|Hard||||40.1%| |0120|Triangle|[Go]({{< relref "/ChapterFour/0100~0199/0120.Triangle.md" >}})|Medium| O(n^2)| O(n)||46.9%| |0121|Best Time to Buy and Sell Stock|[Go]({{< relref "/ChapterFour/0100~0199/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}})|Easy| O(n)| O(1)||51.9%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium||||52.8%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium||||52.9%| |0152|Maximum Product Subarray|[Go]({{< relref "/ChapterFour/0100~0199/0152.Maximum-Product-Subarray.md" >}})|Medium| O(n)| O(1)||32.9%| |0174|Dungeon Game|[Go]({{< relref "/ChapterFour/0100~0199/0174.Dungeon-Game.md" >}})|Hard||||33.5%| |0198|House Robber|[Go]({{< relref "/ChapterFour/0100~0199/0198.House-Robber.md" >}})|Medium| O(n)| O(n)||43.2%| |0213|House Robber II|[Go]({{< relref "/ChapterFour/0200~0299/0213.House-Robber-II.md" >}})|Medium| O(n)| O(n)||37.7%| -|0264|Ugly Number II|[Go]({{< relref "/ChapterFour/0200~0299/0264.Ugly-Number-II.md" >}})|Medium||||43.0%| +|0264|Ugly Number II|[Go]({{< relref "/ChapterFour/0200~0299/0264.Ugly-Number-II.md" >}})|Medium||||43.1%| |0300|Longest Increasing Subsequence|[Go]({{< relref "/ChapterFour/0300~0399/0300.Longest-Increasing-Subsequence.md" >}})|Medium| O(n log n)| O(n)||44.7%| |0303|Range Sum Query - Immutable|[Go]({{< relref "/ChapterFour/0300~0399/0303.Range-Sum-Query-Immutable.md" >}})|Easy||||48.5%| |0304|Range Sum Query 2D - Immutable|[Go]({{< relref "/ChapterFour/0300~0399/0304.Range-Sum-Query-2D-Immutable.md" >}})|Medium||||41.4%| |0309|Best Time to Buy and Sell Stock with Cooldown|[Go]({{< relref "/ChapterFour/0300~0399/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown.md" >}})|Medium| O(n)| O(n)||48.5%| |0322|Coin Change|[Go]({{< relref "/ChapterFour/0300~0399/0322.Coin-Change.md" >}})|Medium| O(n)| O(n)||37.8%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.0%| -|0338|Counting Bits|[Go]({{< relref "/ChapterFour/0300~0399/0338.Counting-Bits.md" >}})|Medium| O(n)| O(n)||70.6%| +|0338|Counting Bits|[Go]({{< relref "/ChapterFour/0300~0399/0338.Counting-Bits.md" >}})|Medium| O(n)| O(n)||70.7%| |0343|Integer Break|[Go]({{< relref "/ChapterFour/0300~0399/0343.Integer-Break.md" >}})|Medium| O(n^2)| O(n)||51.4%| |0354|Russian Doll Envelopes|[Go]({{< relref "/ChapterFour/0300~0399/0354.Russian-Doll-Envelopes.md" >}})|Hard||||37.8%| |0357|Count Numbers with Unique Digits|[Go]({{< relref "/ChapterFour/0300~0399/0357.Count-Numbers-with-Unique-Digits.md" >}})|Medium| O(1)| O(1)||49.0%| @@ -46,7 +46,7 @@ weight: 7 |0410|Split Array Largest Sum|[Go]({{< relref "/ChapterFour/0400~0499/0410.Split-Array-Largest-Sum.md" >}})|Hard||||46.8%| |0413|Arithmetic Slices|[Go]({{< relref "/ChapterFour/0400~0499/0413.Arithmetic-Slices.md" >}})|Medium||||60.1%| |0416|Partition Equal Subset Sum|[Go]({{< relref "/ChapterFour/0400~0499/0416.Partition-Equal-Subset-Sum.md" >}})|Medium| O(n^2)| O(n)||45.0%| -|0474|Ones and Zeroes|[Go]({{< relref "/ChapterFour/0400~0499/0474.Ones-and-Zeroes.md" >}})|Medium||||43.6%| +|0474|Ones and Zeroes|[Go]({{< relref "/ChapterFour/0400~0499/0474.Ones-and-Zeroes.md" >}})|Medium||||43.5%| |0494|Target Sum|[Go]({{< relref "/ChapterFour/0400~0499/0494.Target-Sum.md" >}})|Medium||||45.6%| |0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.3%| |0647|Palindromic Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0647.Palindromic-Substrings.md" >}})|Medium||||62.8%| @@ -60,19 +60,19 @@ weight: 7 |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||39.0%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.7%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.1%| -|1049|Last Stone Weight II|[Go]({{< relref "/ChapterFour/1000~1099/1049.Last-Stone-Weight-II.md" >}})|Medium||||46.1%| +|1049|Last Stone Weight II|[Go]({{< relref "/ChapterFour/1000~1099/1049.Last-Stone-Weight-II.md" >}})|Medium||||46.2%| |1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1000~1099/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard||||64.9%| |1105|Filling Bookcase Shelves|[Go]({{< relref "/ChapterFour/1100~1199/1105.Filling-Bookcase-Shelves.md" >}})|Medium||||57.5%| |1143|Longest Common Subsequence|[Go]({{< relref "/ChapterFour/1100~1199/1143.Longest-Common-Subsequence.md" >}})|Medium||||58.7%| |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.8%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||47.0%| |1463|Cherry Pickup II|[Go]({{< relref "/ChapterFour/1400~1499/1463.Cherry-Pickup-II.md" >}})|Hard||||68.8%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.5%| -|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.0%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.4%| +|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||24.9%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.0%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.6%| -|1664|Ways to Make a Fair Array|[Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}})|Medium||||62.1%| -|1690|Stone Game VII|[Go]({{< relref "/ChapterFour/1600~1699/1690.Stone-Game-VII.md" >}})|Medium||||49.1%| +|1664|Ways to Make a Fair Array|[Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}})|Medium||||62.0%| +|1690|Stone Game VII|[Go]({{< relref "/ChapterFour/1600~1699/1690.Stone-Game-VII.md" >}})|Medium||||49.2%| |1691|Maximum Height by Stacking Cuboids|[Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}})|Hard||||50.5%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Hash_Table.md b/website/content/ChapterTwo/Hash_Table.md index cabc371e..f8237bbb 100644 --- a/website/content/ChapterTwo/Hash_Table.md +++ b/website/content/ChapterTwo/Hash_Table.md @@ -17,10 +17,10 @@ weight: 13 |0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0001~0099/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|47.3%| |0049|Group Anagrams|[Go]({{< relref "/ChapterFour/0001~0099/0049.Group-Anagrams.md" >}})|Medium| O(n log n)| O(n)||59.9%| |0076|Minimum Window Substring|[Go]({{< relref "/ChapterFour/0001~0099/0076.Minimum-Window-Substring.md" >}})|Hard| O(n)| O(n)|❤️|36.3%| -|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.4%| +|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.5%| |0136|Single Number|[Go]({{< relref "/ChapterFour/0100~0199/0136.Single-Number.md" >}})|Easy||||66.8%| |0138|Copy List with Random Pointer|[Go]({{< relref "/ChapterFour/0100~0199/0138.Copy-List-with-Random-Pointer.md" >}})|Medium| O(n)| O(1)||41.7%| -|0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0100~0199/0187.Repeated-DNA-Sequences.md" >}})|Medium||||41.7%| +|0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0100~0199/0187.Repeated-DNA-Sequences.md" >}})|Medium||||41.8%| |0202|Happy Number|[Go]({{< relref "/ChapterFour/0200~0299/0202.Happy-Number.md" >}})|Easy| O(log n)| O(1)||51.4%| |0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.4%| |0205|Isomorphic Strings|[Go]({{< relref "/ChapterFour/0200~0299/0205.Isomorphic-Strings.md" >}})|Easy| O(log n)| O(n)||40.7%| @@ -32,7 +32,7 @@ weight: 13 |0347|Top K Frequent Elements|[Go]({{< relref "/ChapterFour/0300~0399/0347.Top-K-Frequent-Elements.md" >}})|Medium| O(n)| O(n) ||62.7%| |0349|Intersection of Two Arrays|[Go]({{< relref "/ChapterFour/0300~0399/0349.Intersection-of-Two-Arrays.md" >}})|Easy| O(n)| O(n) ||65.5%| |0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||52.2%| -|0387|First Unique Character in a String|[Go]({{< relref "/ChapterFour/0300~0399/0387.First-Unique-Character-in-a-String.md" >}})|Easy||||54.0%| +|0387|First Unique Character in a String|[Go]({{< relref "/ChapterFour/0300~0399/0387.First-Unique-Character-in-a-String.md" >}})|Easy||||54.1%| |0389|Find the Difference|[Go]({{< relref "/ChapterFour/0300~0399/0389.Find-the-Difference.md" >}})|Easy||||58.0%| |0409|Longest Palindrome|[Go]({{< relref "/ChapterFour/0400~0499/0409.Longest-Palindrome.md" >}})|Easy||||52.3%| |0438|Find All Anagrams in a String|[Go]({{< relref "/ChapterFour/0400~0499/0438.Find-All-Anagrams-in-a-String.md" >}})|Medium| O(n)| O(1) ||45.3%| @@ -40,7 +40,7 @@ weight: 13 |0451|Sort Characters By Frequency|[Go]({{< relref "/ChapterFour/0400~0499/0451.Sort-Characters-By-Frequency.md" >}})|Medium| O(n log n)| O(1) ||64.7%| |0454|4Sum II|[Go]({{< relref "/ChapterFour/0400~0499/0454.4Sum-II.md" >}})|Medium| O(n^2)| O(n) ||54.7%| |0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}})|Easy||||66.9%| -|0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500~0599/0500.Keyboard-Row.md" >}})|Easy||||65.9%| +|0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500~0599/0500.Keyboard-Row.md" >}})|Easy||||66.0%| |0508|Most Frequent Subtree Sum|[Go]({{< relref "/ChapterFour/0500~0599/0508.Most-Frequent-Subtree-Sum.md" >}})|Medium||||59.3%| |0535|Encode and Decode TinyURL|[Go]({{< relref "/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md" >}})|Medium||||82.4%| |0575|Distribute Candies|[Go]({{< relref "/ChapterFour/0500~0599/0575.Distribute-Candies.md" >}})|Easy||||64.4%| @@ -71,7 +71,7 @@ weight: 13 |0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0900~0999/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||54.3%| |0987|Vertical Order Traversal of a Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})|Hard||||39.1%| |0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0900~0999/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n) |❤️|50.9%| -|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.6%| +|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.7%| |1078|Occurrences After Bigram|[Go]({{< relref "/ChapterFour/1000~1099/1078.Occurrences-After-Bigram.md" >}})|Easy||||65.0%| |1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1100~1199/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.9%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.8%| diff --git a/website/content/ChapterTwo/Linked_List.md b/website/content/ChapterTwo/Linked_List.md index 23948992..05452e2b 100644 --- a/website/content/ChapterTwo/Linked_List.md +++ b/website/content/ChapterTwo/Linked_List.md @@ -31,32 +31,32 @@ weight: 4 |0025|Reverse Nodes in k-Group|[Go]({{< relref "/ChapterFour/0001~0099/0025.Reverse-Nodes-in-k-Group.md" >}})|Hard| O(log n)| O(1)|❤️|45.6%| |0061|Rotate List|[Go]({{< relref "/ChapterFour/0001~0099/0061.Rotate-List.md" >}})|Medium| O(n)| O(1)||32.0%| |0082|Remove Duplicates from Sorted List II|[Go]({{< relref "/ChapterFour/0001~0099/0082.Remove-Duplicates-from-Sorted-List-II.md" >}})|Medium| O(n)| O(1)||39.6%| -|0083|Remove Duplicates from Sorted List|[Go]({{< relref "/ChapterFour/0001~0099/0083.Remove-Duplicates-from-Sorted-List.md" >}})|Easy| O(n)| O(1)||46.7%| +|0083|Remove Duplicates from Sorted List|[Go]({{< relref "/ChapterFour/0001~0099/0083.Remove-Duplicates-from-Sorted-List.md" >}})|Easy| O(n)| O(1)||46.8%| |0086|Partition List|[Go]({{< relref "/ChapterFour/0001~0099/0086.Partition-List.md" >}})|Medium| O(n)| O(1)|❤️|44.9%| |0092|Reverse Linked List II|[Go]({{< relref "/ChapterFour/0001~0099/0092.Reverse-Linked-List-II.md" >}})|Medium| O(n)| O(1)|❤️|40.9%| |0109|Convert Sorted List to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0109.Convert-Sorted-List-to-Binary-Search-Tree.md" >}})|Medium| O(log n)| O(n)||50.8%| |0138|Copy List with Random Pointer|[Go]({{< relref "/ChapterFour/0100~0199/0138.Copy-List-with-Random-Pointer.md" >}})|Medium||||41.7%| |0141|Linked List Cycle|[Go]({{< relref "/ChapterFour/0100~0199/0141.Linked-List-Cycle.md" >}})|Easy| O(n)| O(1)|❤️|43.2%| |0142|Linked List Cycle II|[Go]({{< relref "/ChapterFour/0100~0199/0142.Linked-List-Cycle-II.md" >}})|Medium| O(n)| O(1)|❤️|40.1%| -|0143|Reorder List|[Go]({{< relref "/ChapterFour/0100~0199/0143.Reorder-List.md" >}})|Medium| O(n)| O(1)|❤️|41.2%| -|0147|Insertion Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0147.Insertion-Sort-List.md" >}})|Medium| O(n)| O(1)|❤️|44.7%| -|0148|Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0148.Sort-List.md" >}})|Medium| O(n log n)| O(n)|❤️|46.8%| -|0160|Intersection of Two Linked Lists|[Go]({{< relref "/ChapterFour/0100~0199/0160.Intersection-of-Two-Linked-Lists.md" >}})|Easy| O(n)| O(1)|❤️|44.7%| +|0143|Reorder List|[Go]({{< relref "/ChapterFour/0100~0199/0143.Reorder-List.md" >}})|Medium| O(n)| O(1)|❤️|41.3%| +|0147|Insertion Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0147.Insertion-Sort-List.md" >}})|Medium| O(n)| O(1)|❤️|44.8%| +|0148|Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0148.Sort-List.md" >}})|Medium| O(n log n)| O(n)|❤️|46.9%| +|0160|Intersection of Two Linked Lists|[Go]({{< relref "/ChapterFour/0100~0199/0160.Intersection-of-Two-Linked-Lists.md" >}})|Easy| O(n)| O(1)|❤️|44.8%| |0203|Remove Linked List Elements|[Go]({{< relref "/ChapterFour/0200~0299/0203.Remove-Linked-List-Elements.md" >}})|Easy| O(n)| O(1)||39.6%| |0206|Reverse Linked List|[Go]({{< relref "/ChapterFour/0200~0299/0206.Reverse-Linked-List.md" >}})|Easy| O(n)| O(1)||65.9%| |0234|Palindrome Linked List|[Go]({{< relref "/ChapterFour/0200~0299/0234.Palindrome-Linked-List.md" >}})|Easy| O(n)| O(1)||42.2%| -|0237|Delete Node in a Linked List|[Go]({{< relref "/ChapterFour/0200~0299/0237.Delete-Node-in-a-Linked-List.md" >}})|Easy| O(n)| O(1)||67.6%| +|0237|Delete Node in a Linked List|[Go]({{< relref "/ChapterFour/0200~0299/0237.Delete-Node-in-a-Linked-List.md" >}})|Easy| O(n)| O(1)||67.7%| |0328|Odd Even Linked List|[Go]({{< relref "/ChapterFour/0300~0399/0328.Odd-Even-Linked-List.md" >}})|Medium| O(n)| O(1)||57.3%| -|0445|Add Two Numbers II|[Go]({{< relref "/ChapterFour/0400~0499/0445.Add-Two-Numbers-II.md" >}})|Medium| O(n)| O(n)||56.6%| +|0445|Add Two Numbers II|[Go]({{< relref "/ChapterFour/0400~0499/0445.Add-Two-Numbers-II.md" >}})|Medium| O(n)| O(n)||56.7%| |0707|Design Linked List|[Go]({{< relref "/ChapterFour/0700~0799/0707.Design-Linked-List.md" >}})|Medium| O(n)| O(1)||26.1%| |0725|Split Linked List in Parts|[Go]({{< relref "/ChapterFour/0700~0799/0725.Split-Linked-List-in-Parts.md" >}})|Medium| O(n)| O(1)||53.2%| |0817|Linked List Components|[Go]({{< relref "/ChapterFour/0800~0899/0817.Linked-List-Components.md" >}})|Medium| O(n)| O(1)||57.8%| |0876|Middle of the Linked List|[Go]({{< relref "/ChapterFour/0800~0899/0876.Middle-of-the-Linked-List.md" >}})|Easy| O(n)| O(1)|❤️|69.3%| |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1000~1099/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.3%| -|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go]({{< relref "/ChapterFour/1100~1199/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List.md" >}})|Medium||||41.6%| +|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go]({{< relref "/ChapterFour/1100~1199/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List.md" >}})|Medium||||41.5%| |1290|Convert Binary Number in a Linked List to Integer|[Go]({{< relref "/ChapterFour/1200~1299/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer.md" >}})|Easy||||81.7%| |1669|Merge In Between Linked Lists|[Go]({{< relref "/ChapterFour/1600~1699/1669.Merge-In-Between-Linked-Lists.md" >}})|Medium||||75.5%| -|1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1600~1699/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||54.0%| +|1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1600~1699/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||54.1%| |1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||67.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index ee183bb7..78a94d33 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -23,7 +23,7 @@ weight: 12 |0069|Sqrt(x)|[Go]({{< relref "/ChapterFour/0001~0099/0069.Sqrtx.md" >}})|Easy| O(log n)| O(1)||35.5%| |0168|Excel Sheet Column Title|[Go]({{< relref "/ChapterFour/0100~0199/0168.Excel-Sheet-Column-Title.md" >}})|Easy||||32.0%| |0171|Excel Sheet Column Number|[Go]({{< relref "/ChapterFour/0100~0199/0171.Excel-Sheet-Column-Number.md" >}})|Easy||||57.2%| -|0172|Factorial Trailing Zeroes|[Go]({{< relref "/ChapterFour/0100~0199/0172.Factorial-Trailing-Zeroes.md" >}})|Easy||||38.8%| +|0172|Factorial Trailing Zeroes|[Go]({{< relref "/ChapterFour/0100~0199/0172.Factorial-Trailing-Zeroes.md" >}})|Easy||||38.9%| |0202|Happy Number|[Go]({{< relref "/ChapterFour/0200~0299/0202.Happy-Number.md" >}})|Easy| O(log n)| O(1)||51.4%| |0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.4%| |0223|Rectangle Area|[Go]({{< relref "/ChapterFour/0200~0299/0223.Rectangle-Area.md" >}})|Medium||||38.4%| @@ -31,12 +31,12 @@ weight: 12 |0231|Power of Two|[Go]({{< relref "/ChapterFour/0200~0299/0231.Power-of-Two.md" >}})|Easy| O(1)| O(1)||43.8%| |0258|Add Digits|[Go]({{< relref "/ChapterFour/0200~0299/0258.Add-Digits.md" >}})|Easy||||58.8%| |0263|Ugly Number|[Go]({{< relref "/ChapterFour/0200~0299/0263.Ugly-Number.md" >}})|Easy| O(log n)| O(1)||41.7%| -|0264|Ugly Number II|[Go]({{< relref "/ChapterFour/0200~0299/0264.Ugly-Number-II.md" >}})|Medium||||43.0%| +|0264|Ugly Number II|[Go]({{< relref "/ChapterFour/0200~0299/0264.Ugly-Number-II.md" >}})|Medium||||43.1%| |0268|Missing Number|[Go]({{< relref "/ChapterFour/0200~0299/0268.Missing-Number.md" >}})|Easy||||55.4%| -|0326|Power of Three|[Go]({{< relref "/ChapterFour/0300~0399/0326.Power-of-Three.md" >}})|Easy| O(1)| O(1)||42.1%| +|0326|Power of Three|[Go]({{< relref "/ChapterFour/0300~0399/0326.Power-of-Three.md" >}})|Easy| O(1)| O(1)||42.3%| |0343|Integer Break|[Go]({{< relref "/ChapterFour/0300~0399/0343.Integer-Break.md" >}})|Medium| O(n^2)| O(n)||51.4%| |0357|Count Numbers with Unique Digits|[Go]({{< relref "/ChapterFour/0300~0399/0357.Count-Numbers-with-Unique-Digits.md" >}})|Medium| O(1)| O(1)||49.0%| -|0367|Valid Perfect Square|[Go]({{< relref "/ChapterFour/0300~0399/0367.Valid-Perfect-Square.md" >}})|Easy||||42.2%| +|0367|Valid Perfect Square|[Go]({{< relref "/ChapterFour/0300~0399/0367.Valid-Perfect-Square.md" >}})|Easy||||42.3%| |0368|Largest Divisible Subset|[Go]({{< relref "/ChapterFour/0300~0399/0368.Largest-Divisible-Subset.md" >}})|Medium||||38.5%| |0372|Super Pow|[Go]({{< relref "/ChapterFour/0300~0399/0372.Super-Pow.md" >}})|Medium||||36.8%| |0397|Integer Replacement|[Go]({{< relref "/ChapterFour/0300~0399/0397.Integer-Replacement.md" >}})|Medium||||33.6%| @@ -44,12 +44,12 @@ weight: 12 |0423|Reconstruct Original Digits from English|[Go]({{< relref "/ChapterFour/0400~0499/0423.Reconstruct-Original-Digits-from-English.md" >}})|Medium||||50.9%| |0441|Arranging Coins|[Go]({{< relref "/ChapterFour/0400~0499/0441.Arranging-Coins.md" >}})|Easy||||42.7%| |0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0400~0499/0447.Number-of-Boomerangs.md" >}})|Medium||||52.6%| -|0453|Minimum Moves to Equal Array Elements|[Go]({{< relref "/ChapterFour/0400~0499/0453.Minimum-Moves-to-Equal-Array-Elements.md" >}})|Easy||||51.0%| +|0453|Minimum Moves to Equal Array Elements|[Go]({{< relref "/ChapterFour/0400~0499/0453.Minimum-Moves-to-Equal-Array-Elements.md" >}})|Easy||||51.1%| |0478|Generate Random Point in a Circle|[Go]({{< relref "/ChapterFour/0400~0499/0478.Generate-Random-Point-in-a-Circle.md" >}})|Medium||||39.1%| |0483|Smallest Good Base|[Go]({{< relref "/ChapterFour/0400~0499/0483.Smallest-Good-Base.md" >}})|Hard||||36.4%| |0507|Perfect Number|[Go]({{< relref "/ChapterFour/0500~0599/0507.Perfect-Number.md" >}})|Easy||||36.4%| |0535|Encode and Decode TinyURL|[Go]({{< relref "/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md" >}})|Medium||||82.4%| -|0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.5%| +|0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.4%| |0598|Range Addition II|[Go]({{< relref "/ChapterFour/0500~0599/0598.Range-Addition-II.md" >}})|Easy||||50.3%| |0628|Maximum Product of Three Numbers|[Go]({{< relref "/ChapterFour/0600~0699/0628.Maximum-Product-of-Three-Numbers.md" >}})|Easy| O(n)| O(1)||46.8%| |0633|Sum of Square Numbers|[Go]({{< relref "/ChapterFour/0600~0699/0633.Sum-of-Square-Numbers.md" >}})|Medium||||32.7%| @@ -59,7 +59,7 @@ weight: 12 |0781|Rabbits in Forest|[Go]({{< relref "/ChapterFour/0700~0799/0781.Rabbits-in-Forest.md" >}})|Medium||||55.8%| |0812|Largest Triangle Area|[Go]({{< relref "/ChapterFour/0800~0899/0812.Largest-Triangle-Area.md" >}})|Easy||||59.1%| |0836|Rectangle Overlap|[Go]({{< relref "/ChapterFour/0800~0899/0836.Rectangle-Overlap.md" >}})|Easy||||43.5%| -|0869|Reordered Power of 2|[Go]({{< relref "/ChapterFour/0800~0899/0869.Reordered-Power-of-2.md" >}})|Medium||||61.3%| +|0869|Reordered Power of 2|[Go]({{< relref "/ChapterFour/0800~0899/0869.Reordered-Power-of-2.md" >}})|Medium||||61.2%| |0878|Nth Magical Number|[Go]({{< relref "/ChapterFour/0800~0899/0878.Nth-Magical-Number.md" >}})|Hard||||28.9%| |0885|Spiral Matrix III|[Go]({{< relref "/ChapterFour/0800~0899/0885.Spiral-Matrix-III.md" >}})|Medium| O(n^2)| O(1)||71.1%| |0887|Super Egg Drop|[Go]({{< relref "/ChapterFour/0800~0899/0887.Super-Egg-Drop.md" >}})|Hard||||27.0%| @@ -67,7 +67,7 @@ weight: 12 |0892|Surface Area of 3D Shapes|[Go]({{< relref "/ChapterFour/0800~0899/0892.Surface-Area-of-3D-Shapes.md" >}})|Easy||||60.0%| |0910|Smallest Range II|[Go]({{< relref "/ChapterFour/0900~0999/0910.Smallest-Range-II.md" >}})|Medium||||31.2%| |0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0900~0999/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||33.9%| -|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0900~0999/0927.Three-Equal-Parts.md" >}})|Hard||||34.6%| +|0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0900~0999/0927.Three-Equal-Parts.md" >}})|Hard||||34.7%| |0942|DI String Match|[Go]({{< relref "/ChapterFour/0900~0999/0942.DI-String-Match.md" >}})|Easy| O(n)| O(1)||73.8%| |0949|Largest Time for Given Digits|[Go]({{< relref "/ChapterFour/0900~0999/0949.Largest-Time-for-Given-Digits.md" >}})|Medium||||36.2%| |0952|Largest Component Size by Common Factor|[Go]({{< relref "/ChapterFour/0900~0999/0952.Largest-Component-Size-by-Common-Factor.md" >}})|Hard||||36.5%| @@ -78,7 +78,7 @@ weight: 12 |1006|Clumsy Factorial|[Go]({{< relref "/ChapterFour/1000~1099/1006.Clumsy-Factorial.md" >}})|Medium||||53.7%| |1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1000~1099/1017.Convert-to-Base-2.md" >}})|Medium||||59.2%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.1%| -|1037|Valid Boomerang|[Go]({{< relref "/ChapterFour/1000~1099/1037.Valid-Boomerang.md" >}})|Easy||||37.6%| +|1037|Valid Boomerang|[Go]({{< relref "/ChapterFour/1000~1099/1037.Valid-Boomerang.md" >}})|Easy||||37.5%| |1073|Adding Two Negabinary Numbers|[Go]({{< relref "/ChapterFour/1000~1099/1073.Adding-Two-Negabinary-Numbers.md" >}})|Medium||||34.8%| |1093|Statistics from a Large Sample|[Go]({{< relref "/ChapterFour/1000~1099/1093.Statistics-from-a-Large-Sample.md" >}})|Medium||||48.6%| |1154|Day of the Year|[Go]({{< relref "/ChapterFour/1100~1199/1154.Day-of-the-Year.md" >}})|Easy||||49.1%| @@ -90,11 +90,11 @@ weight: 12 |1317|Convert Integer to the Sum of Two No-Zero Integers|[Go]({{< relref "/ChapterFour/1300~1399/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md" >}})|Easy||||56.9%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.6%| |1551|Minimum Operations to Make Array Equal|[Go]({{< relref "/ChapterFour/1500~1599/1551.Minimum-Operations-to-Make-Array-Equal.md" >}})|Medium||||80.8%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.5%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.4%| |1648|Sell Diminishing-Valued Colored Balls|[Go]({{< relref "/ChapterFour/1600~1699/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}})|Medium||||30.7%| |1680|Concatenation of Consecutive Binary Numbers|[Go]({{< relref "/ChapterFour/1600~1699/1680.Concatenation-of-Consecutive-Binary-Numbers.md" >}})|Medium||||52.3%| |1685|Sum of Absolute Differences in a Sorted Array|[Go]({{< relref "/ChapterFour/1600~1699/1685.Sum-of-Absolute-Differences-in-a-Sorted-Array.md" >}})|Medium||||63.2%| -|1716|Calculate Money in Leetcode Bank|[Go]({{< relref "/ChapterFour/1700~1799/1716.Calculate-Money-in-Leetcode-Bank.md" >}})|Easy||||64.7%| +|1716|Calculate Money in Leetcode Bank|[Go]({{< relref "/ChapterFour/1700~1799/1716.Calculate-Money-in-Leetcode-Bank.md" >}})|Easy||||64.6%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Sliding_Window.md b/website/content/ChapterTwo/Sliding_Window.md index ee03e48d..6f78461d 100644 --- a/website/content/ChapterTwo/Sliding_Window.md +++ b/website/content/ChapterTwo/Sliding_Window.md @@ -38,12 +38,12 @@ weight: 17 |0567|Permutation in String|[Go]({{< relref "/ChapterFour/0500~0599/0567.Permutation-in-String.md" >}})|Medium| O(n)| O(1)|❤️|44.6%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium| O(n)| O(1)|❤️|46.7%| |0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0900~0999/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n)|❤️|50.9%| -|0995|Minimum Number of K Consecutive Bit Flips|[Go]({{< relref "/ChapterFour/0900~0999/0995.Minimum-Number-of-K-Consecutive-Bit-Flips.md" >}})|Hard| O(n)| O(1)|❤️|50.1%| -|1004|Max Consecutive Ones III|[Go]({{< relref "/ChapterFour/1000~1099/1004.Max-Consecutive-Ones-III.md" >}})|Medium| O(n)| O(1) ||60.9%| +|0995|Minimum Number of K Consecutive Bit Flips|[Go]({{< relref "/ChapterFour/0900~0999/0995.Minimum-Number-of-K-Consecutive-Bit-Flips.md" >}})|Hard| O(n)| O(1)|❤️|50.2%| +|1004|Max Consecutive Ones III|[Go]({{< relref "/ChapterFour/1000~1099/1004.Max-Consecutive-Ones-III.md" >}})|Medium| O(n)| O(1) ||61.0%| |1040|Moving Stones Until Consecutive II|[Go]({{< relref "/ChapterFour/1000~1099/1040.Moving-Stones-Until-Consecutive-II.md" >}})|Medium| O(n log n)| O(1) |❤️|54.3%| |1052|Grumpy Bookstore Owner|[Go]({{< relref "/ChapterFour/1000~1099/1052.Grumpy-Bookstore-Owner.md" >}})|Medium| O(n log n)| O(1) ||56.0%| |1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1000~1099/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard| O(n^3)| O(n) |❤️|64.9%| -|1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.3%| +|1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.4%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||47.0%| |1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go]({{< relref "/ChapterFour/1400~1499/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit.md" >}})|Medium||||44.5%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%| diff --git a/website/content/ChapterTwo/Sort.md b/website/content/ChapterTwo/Sort.md index 251db3ee..50b2215d 100644 --- a/website/content/ChapterTwo/Sort.md +++ b/website/content/ChapterTwo/Sort.md @@ -21,8 +21,8 @@ weight: 14 |0056|Merge Intervals|[Go]({{< relref "/ChapterFour/0001~0099/0056.Merge-Intervals.md" >}})|Medium| O(n log n)| O(log n)||41.5%| |0057|Insert Interval|[Go]({{< relref "/ChapterFour/0001~0099/0057.Insert-Interval.md" >}})|Medium| O(n)| O(1)||35.4%| |0075|Sort Colors|[Go]({{< relref "/ChapterFour/0001~0099/0075.Sort-Colors.md" >}})|Medium| O(n)| O(1)|❤️|50.0%| -|0147|Insertion Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0147.Insertion-Sort-List.md" >}})|Medium| O(n^2)| O(1) |❤️|44.7%| -|0148|Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0148.Sort-List.md" >}})|Medium|O(n log n)| O(log n)|❤️|46.8%| +|0147|Insertion Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0147.Insertion-Sort-List.md" >}})|Medium| O(n^2)| O(1) |❤️|44.8%| +|0148|Sort List|[Go]({{< relref "/ChapterFour/0100~0199/0148.Sort-List.md" >}})|Medium|O(n log n)| O(log n)|❤️|46.9%| |0164|Maximum Gap|[Go]({{< relref "/ChapterFour/0100~0199/0164.Maximum-Gap.md" >}})|Hard| O(n log n)| O(log n) |❤️|37.2%| |0179|Largest Number|[Go]({{< relref "/ChapterFour/0100~0199/0179.Largest-Number.md" >}})|Medium| O(n log n)| O(log n) |❤️|30.9%| |0220|Contains Duplicate III|[Go]({{< relref "/ChapterFour/0200~0299/0220.Contains-Duplicate-III.md" >}})|Medium| O(n log n)| O(1) |❤️|21.4%| @@ -37,7 +37,7 @@ weight: 14 |0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium| O(n)| O(1) ||50.2%| |0710|Random Pick with Blacklist|[Go]({{< relref "/ChapterFour/0700~0799/0710.Random-Pick-with-Blacklist.md" >}})|Hard| O(n)| O(n) ||33.1%| |0767|Reorganize String|[Go]({{< relref "/ChapterFour/0700~0799/0767.Reorganize-String.md" >}})|Medium| O(n log n)| O(log n) |❤️|50.3%| -|0853|Car Fleet|[Go]({{< relref "/ChapterFour/0800~0899/0853.Car-Fleet.md" >}})|Medium| O(n log n)| O(log n) ||44.5%| +|0853|Car Fleet|[Go]({{< relref "/ChapterFour/0800~0899/0853.Car-Fleet.md" >}})|Medium| O(n log n)| O(log n) ||44.6%| |0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0900~0999/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1) ||70.7%| |0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}})|Medium| O(n log n)| O(log n) |❤️|68.8%| |0973|K Closest Points to Origin|[Go]({{< relref "/ChapterFour/0900~0999/0973.K-Closest-Points-to-Origin.md" >}})|Medium| O(n log n)| O(log n) ||64.7%| diff --git a/website/content/ChapterTwo/Stack.md b/website/content/ChapterTwo/Stack.md index 20678c23..bda3810b 100644 --- a/website/content/ChapterTwo/Stack.md +++ b/website/content/ChapterTwo/Stack.md @@ -18,10 +18,10 @@ weight: 5 | No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance | |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0020|Valid Parentheses|[Go]({{< relref "/ChapterFour/0001~0099/0020.Valid-Parentheses.md" >}})|Easy| O(log n)| O(1)||40.0%| -|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.7%| +|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.8%| |0071|Simplify Path|[Go]({{< relref "/ChapterFour/0001~0099/0071.Simplify-Path.md" >}})|Medium| O(n)| O(n)|❤️|35.0%| |0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0001~0099/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|37.5%| -|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.4%| +|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.5%| |0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.6%| |0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.0%| |0145|Binary Tree Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0145.Binary-Tree-Postorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.2%| @@ -29,11 +29,11 @@ weight: 5 |0155|Min Stack|[Go]({{< relref "/ChapterFour/0100~0199/0155.Min-Stack.md" >}})|Easy| O(n)| O(n)||46.9%| |0173|Binary Search Tree Iterator|[Go]({{< relref "/ChapterFour/0100~0199/0173.Binary-Search-Tree-Iterator.md" >}})|Medium| O(n)| O(1)||60.8%| |0224|Basic Calculator|[Go]({{< relref "/ChapterFour/0200~0299/0224.Basic-Calculator.md" >}})|Hard| O(n)| O(n)||38.3%| -|0225|Implement Stack using Queues|[Go]({{< relref "/ChapterFour/0200~0299/0225.Implement-Stack-using-Queues.md" >}})|Easy| O(n)| O(n)||48.0%| +|0225|Implement Stack using Queues|[Go]({{< relref "/ChapterFour/0200~0299/0225.Implement-Stack-using-Queues.md" >}})|Easy| O(n)| O(n)||48.1%| |0227|Basic Calculator II|[Go]({{< relref "/ChapterFour/0200~0299/0227.Basic-Calculator-II.md" >}})|Medium||||38.9%| -|0232|Implement Queue using Stacks|[Go]({{< relref "/ChapterFour/0200~0299/0232.Implement-Queue-using-Stacks.md" >}})|Easy| O(n)| O(n)||52.8%| +|0232|Implement Queue using Stacks|[Go]({{< relref "/ChapterFour/0200~0299/0232.Implement-Queue-using-Stacks.md" >}})|Easy| O(n)| O(n)||52.9%| |0331|Verify Preorder Serialization of a Binary Tree|[Go]({{< relref "/ChapterFour/0300~0399/0331.Verify-Preorder-Serialization-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||41.2%| -|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||55.9%| +|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||56.0%| |0385|Mini Parser|[Go]({{< relref "/ChapterFour/0300~0399/0385.Mini-Parser.md" >}})|Medium||||34.7%| |0394|Decode String|[Go]({{< relref "/ChapterFour/0300~0399/0394.Decode-String.md" >}})|Medium| O(n)| O(n)||53.1%| |0402|Remove K Digits|[Go]({{< relref "/ChapterFour/0400~0499/0402.Remove-K-Digits.md" >}})|Medium| O(n)| O(1)||28.7%| @@ -57,7 +57,7 @@ weight: 5 |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1000~1099/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.3%| |1021|Remove Outermost Parentheses|[Go]({{< relref "/ChapterFour/1000~1099/1021.Remove-Outermost-Parentheses.md" >}})|Easy| O(n)| O(1)||79.2%| |1047|Remove All Adjacent Duplicates In String|[Go]({{< relref "/ChapterFour/1000~1099/1047.Remove-All-Adjacent-Duplicates-In-String.md" >}})|Easy| O(n)| O(1)||71.5%| -|1209|Remove All Adjacent Duplicates in String II|[Go]({{< relref "/ChapterFour/1200~1299/1209.Remove-All-Adjacent-Duplicates-in-String-II.md" >}})|Medium||||57.8%| +|1209|Remove All Adjacent Duplicates in String II|[Go]({{< relref "/ChapterFour/1200~1299/1209.Remove-All-Adjacent-Duplicates-in-String-II.md" >}})|Medium||||57.7%| |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.3%| |1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1600~1699/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||45.5%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index d7da52ca..c6b05107 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -29,17 +29,17 @@ weight: 2 |0091|Decode Ways|[Go]({{< relref "/ChapterFour/0001~0099/0091.Decode-Ways.md" >}})|Medium| O(n)| O(n)||27.0%| |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0001~0099/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|38.0%| |0115|Distinct Subsequences|[Go]({{< relref "/ChapterFour/0100~0199/0115.Distinct-Subsequences.md" >}})|Hard||||40.1%| -|0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0100~0199/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.6%| +|0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0100~0199/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.7%| |0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| |0151|Reverse Words in a String|[Go]({{< relref "/ChapterFour/0100~0199/0151.Reverse-Words-in-a-String.md" >}})|Medium||||24.3%| |0227|Basic Calculator II|[Go]({{< relref "/ChapterFour/0200~0299/0227.Basic-Calculator-II.md" >}})|Medium||||38.9%| |0344|Reverse String|[Go]({{< relref "/ChapterFour/0300~0399/0344.Reverse-String.md" >}})|Easy| O(n)| O(1)||70.8%| |0345|Reverse Vowels of a String|[Go]({{< relref "/ChapterFour/0300~0399/0345.Reverse-Vowels-of-a-String.md" >}})|Easy| O(n)| O(1)||45.3%| |0385|Mini Parser|[Go]({{< relref "/ChapterFour/0300~0399/0385.Mini-Parser.md" >}})|Medium||||34.7%| -|0387|First Unique Character in a String|[Go]({{< relref "/ChapterFour/0300~0399/0387.First-Unique-Character-in-a-String.md" >}})|Easy||||54.0%| -|0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.5%| +|0387|First Unique Character in a String|[Go]({{< relref "/ChapterFour/0300~0399/0387.First-Unique-Character-in-a-String.md" >}})|Easy||||54.1%| +|0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.4%| |0541|Reverse String II|[Go]({{< relref "/ChapterFour/0500~0599/0541.Reverse-String-II.md" >}})|Easy||||49.6%| -|0557|Reverse Words in a String III|[Go]({{< relref "/ChapterFour/0500~0599/0557.Reverse-Words-in-a-String-III.md" >}})|Easy||||72.5%| +|0557|Reverse Words in a String III|[Go]({{< relref "/ChapterFour/0500~0599/0557.Reverse-Words-in-a-String-III.md" >}})|Easy||||72.6%| |0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.7%| |0647|Palindromic Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0647.Palindromic-Substrings.md" >}})|Medium||||62.8%| |0696|Count Binary Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0696.Count-Binary-Substrings.md" >}})|Easy||||61.2%| @@ -48,28 +48,28 @@ weight: 2 |0842|Split Array into Fibonacci Sequence|[Go]({{< relref "/ChapterFour/0800~0899/0842.Split-Array-into-Fibonacci-Sequence.md" >}})|Medium| O(n^2)| O(1)|❤️|37.0%| |0856|Score of Parentheses|[Go]({{< relref "/ChapterFour/0800~0899/0856.Score-of-Parentheses.md" >}})|Medium| O(n)| O(n)||64.9%| |0916|Word Subsets|[Go]({{< relref "/ChapterFour/0900~0999/0916.Word-Subsets.md" >}})|Medium||||52.8%| -|0925|Long Pressed Name|[Go]({{< relref "/ChapterFour/0900~0999/0925.Long-Pressed-Name.md" >}})|Easy| O(n)| O(1)||37.2%| +|0925|Long Pressed Name|[Go]({{< relref "/ChapterFour/0900~0999/0925.Long-Pressed-Name.md" >}})|Easy| O(n)| O(1)||37.1%| |0966|Vowel Spellchecker|[Go]({{< relref "/ChapterFour/0900~0999/0966.Vowel-Spellchecker.md" >}})|Medium||||51.9%| |1003|Check If Word Is Valid After Substitutions|[Go]({{< relref "/ChapterFour/1000~1099/1003.Check-If-Word-Is-Valid-After-Substitutions.md" >}})|Medium| O(n)| O(1)||56.7%| |1108|Defanging an IP Address|[Go]({{< relref "/ChapterFour/1100~1199/1108.Defanging-an-IP-Address.md" >}})|Easy||||88.4%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1100~1199/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||60.4%| |1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1100~1199/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||62.2%| |1221|Split a String in Balanced Strings|[Go]({{< relref "/ChapterFour/1200~1299/1221.Split-a-String-in-Balanced-Strings.md" >}})|Easy||||84.3%| -|1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1200~1299/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.6%| +|1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1200~1299/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.7%| |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.3%| |1332|Remove Palindromic Subsequences|[Go]({{< relref "/ChapterFour/1300~1399/1332.Remove-Palindromic-Subsequences.md" >}})|Easy||||68.4%| |1455|Check If a Word Occurs As a Prefix of Any Word in a Sentence|[Go]({{< relref "/ChapterFour/1400~1499/1455.Check-If-a-Word-Occurs-As-a-Prefix-of-Any-Word-in-a-Sentence.md" >}})|Easy||||65.4%| -|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.3%| +|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.2%| |1573|Number of Ways to Split a String|[Go]({{< relref "/ChapterFour/1500~1599/1573.Number-of-Ways-to-Split-a-String.md" >}})|Medium||||31.4%| |1614|Maximum Nesting Depth of the Parentheses|[Go]({{< relref "/ChapterFour/1600~1699/1614.Maximum-Nesting-Depth-of-the-Parentheses.md" >}})|Easy||||82.7%| |1624|Largest Substring Between Two Equal Characters|[Go]({{< relref "/ChapterFour/1600~1699/1624.Largest-Substring-Between-Two-Equal-Characters.md" >}})|Easy||||58.5%| |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||51.8%| |1662|Check If Two String Arrays are Equivalent|[Go]({{< relref "/ChapterFour/1600~1699/1662.Check-If-Two-String-Arrays-are-Equivalent.md" >}})|Easy||||82.5%| |1668|Maximum Repeating Substring|[Go]({{< relref "/ChapterFour/1600~1699/1668.Maximum-Repeating-Substring.md" >}})|Easy||||38.6%| -|1678|Goal Parser Interpretation|[Go]({{< relref "/ChapterFour/1600~1699/1678.Goal-Parser-Interpretation.md" >}})|Easy||||85.3%| -|1684|Count the Number of Consistent Strings|[Go]({{< relref "/ChapterFour/1600~1699/1684.Count-the-Number-of-Consistent-Strings.md" >}})|Easy||||81.7%| -|1694|Reformat Phone Number|[Go]({{< relref "/ChapterFour/1600~1699/1694.Reformat-Phone-Number.md" >}})|Easy||||65.0%| -|1704|Determine if String Halves Are Alike|[Go]({{< relref "/ChapterFour/1700~1799/1704.Determine-if-String-Halves-Are-Alike.md" >}})|Easy||||79.1%| +|1678|Goal Parser Interpretation|[Go]({{< relref "/ChapterFour/1600~1699/1678.Goal-Parser-Interpretation.md" >}})|Easy||||85.2%| +|1684|Count the Number of Consistent Strings|[Go]({{< relref "/ChapterFour/1600~1699/1684.Count-the-Number-of-Consistent-Strings.md" >}})|Easy||||81.8%| +|1694|Reformat Phone Number|[Go]({{< relref "/ChapterFour/1600~1699/1694.Reformat-Phone-Number.md" >}})|Easy||||64.9%| +|1704|Determine if String Halves Are Alike|[Go]({{< relref "/ChapterFour/1700~1799/1704.Determine-if-String-Halves-Are-Alike.md" >}})|Easy||||79.0%| |1736|Latest Time by Replacing Hidden Digits|[Go]({{< relref "/ChapterFour/1700~1799/1736.Latest-Time-by-Replacing-Hidden-Digits.md" >}})|Easy||||41.2%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index 0bae3c0f..9df76ee9 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -9,7 +9,7 @@ weight: 6 | No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance | |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | -|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.4%| +|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.5%| |0095|Unique Binary Search Trees II|[Go]({{< relref "/ChapterFour/0001~0099/0095.Unique-Binary-Search-Trees-II.md" >}})|Medium||||43.2%| |0096|Unique Binary Search Trees|[Go]({{< relref "/ChapterFour/0001~0099/0096.Unique-Binary-Search-Trees.md" >}})|Medium| O(n^2)| O(n)||54.8%| |0098|Validate Binary Search Tree|[Go]({{< relref "/ChapterFour/0001~0099/0098.Validate-Binary-Search-Tree.md" >}})|Medium| O(n)| O(1)||29.0%| @@ -25,11 +25,11 @@ weight: 6 |0108|Convert Sorted Array to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0108.Convert-Sorted-Array-to-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||61.1%| |0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.9%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.9%| -|0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.7%| +|0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.8%| |0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.7%| |0114|Flatten Binary Tree to Linked List|[Go]({{< relref "/ChapterFour/0100~0199/0114.Flatten-Binary-Tree-to-Linked-List.md" >}})|Medium| O(n)| O(1)||52.6%| |0124|Binary Tree Maximum Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0124.Binary-Tree-Maximum-Path-Sum.md" >}})|Hard| O(n)| O(1)||35.7%| -|0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.4%| +|0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.5%| |0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.0%| |0145|Binary Tree Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0145.Binary-Tree-Postorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.2%| |0173|Binary Search Tree Iterator|[Go]({{< relref "/ChapterFour/0100~0199/0173.Binary-Search-Tree-Iterator.md" >}})|Medium| O(n)| O(1)||60.8%| @@ -39,7 +39,7 @@ weight: 6 |0230|Kth Smallest Element in a BST|[Go]({{< relref "/ChapterFour/0200~0299/0230.Kth-Smallest-Element-in-a-BST.md" >}})|Medium| O(n)| O(1)||63.1%| |0235|Lowest Common Ancestor of a Binary Search Tree|[Go]({{< relref "/ChapterFour/0200~0299/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |0236|Lowest Common Ancestor of a Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0236.Lowest-Common-Ancestor-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||49.6%| -|0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0200~0299/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||54.2%| +|0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0200~0299/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||54.3%| |0297|Serialize and Deserialize Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}})|Hard||||50.4%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.0%| |0404|Sum of Left Leaves|[Go]({{< relref "/ChapterFour/0400~0499/0404.Sum-of-Left-Leaves.md" >}})|Easy| O(n)| O(1)||52.4%| @@ -60,10 +60,11 @@ weight: 6 |0684|Redundant Connection|[Go]({{< relref "/ChapterFour/0600~0699/0684.Redundant-Connection.md" >}})|Medium||||59.2%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard||||33.2%| |0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.3%| -|0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||46.7%| -|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.2%| +|0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0800~0899/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||46.8%| +|0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0800~0899/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||58.3%| |0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0800~0899/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.5%| |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0800~0899/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.7%| +|0938|Range Sum of BST|[Go]({{< relref "/ChapterFour/0900~0999/0938.Range-Sum-of-BST.md" >}})|Easy||||83.3%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||39.0%| |0971|Flip Binary Tree To Match Preorder Traversal|[Go]({{< relref "/ChapterFour/0900~0999/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal.md" >}})|Medium||||50.1%| |0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||70.0%| @@ -75,7 +76,7 @@ weight: 6 |1110|Delete Nodes And Return Forest|[Go]({{< relref "/ChapterFour/1100~1199/1110.Delete-Nodes-And-Return-Forest.md" >}})|Medium||||67.9%| |1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1100~1199/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||68.1%| |1145|Binary Tree Coloring Game|[Go]({{< relref "/ChapterFour/1100~1199/1145.Binary-Tree-Coloring-Game.md" >}})|Medium||||51.2%| -|1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||85.5%| +|1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||85.4%| |1305|All Elements in Two Binary Search Trees|[Go]({{< relref "/ChapterFour/1300~1399/1305.All-Elements-in-Two-Binary-Search-Trees.md" >}})|Medium||||77.8%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Two_Pointers.md b/website/content/ChapterTwo/Two_Pointers.md index 97222391..cf7cd4c5 100644 --- a/website/content/ChapterTwo/Two_Pointers.md +++ b/website/content/ChapterTwo/Two_Pointers.md @@ -34,22 +34,22 @@ weight: 3 |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0003|Longest Substring Without Repeating Characters|[Go]({{< relref "/ChapterFour/0001~0099/0003.Longest-Substring-Without-Repeating-Characters.md" >}})|Medium| O(n)| O(1)|❤️|31.6%| |0011|Container With Most Water|[Go]({{< relref "/ChapterFour/0001~0099/0011.Container-With-Most-Water.md" >}})|Medium| O(n)| O(1)||52.9%| -|0015|3Sum|[Go]({{< relref "/ChapterFour/0001~0099/0015.3Sum.md" >}})|Medium| O(n^2)| O(n)|❤️|28.3%| +|0015|3Sum|[Go]({{< relref "/ChapterFour/0001~0099/0015.3Sum.md" >}})|Medium| O(n^2)| O(n)|❤️|28.4%| |0016|3Sum Closest|[Go]({{< relref "/ChapterFour/0001~0099/0016.3Sum-Closest.md" >}})|Medium| O(n^2)| O(1)|❤️|46.4%| |0018|4Sum|[Go]({{< relref "/ChapterFour/0001~0099/0018.4Sum.md" >}})|Medium| O(n^3)| O(n^2)|❤️|35.2%| |0019|Remove Nth Node From End of List|[Go]({{< relref "/ChapterFour/0001~0099/0019.Remove-Nth-Node-From-End-of-List.md" >}})|Medium| O(n)| O(1)||36.2%| |0026|Remove Duplicates from Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0026.Remove-Duplicates-from-Sorted-Array.md" >}})|Easy| O(n)| O(1)||46.9%| -|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.5%| +|0027|Remove Element|[Go]({{< relref "/ChapterFour/0001~0099/0027.Remove-Element.md" >}})|Easy| O(n)| O(1)||49.6%| |0028|Implement strStr()|[Go]({{< relref "/ChapterFour/0001~0099/0028.Implement-strStr.md" >}})|Easy| O(n)| O(1)||35.4%| |0030|Substring with Concatenation of All Words|[Go]({{< relref "/ChapterFour/0001~0099/0030.Substring-with-Concatenation-of-All-Words.md" >}})|Hard| O(n)| O(n)|❤️|26.4%| -|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.7%| +|0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.8%| |0061|Rotate List|[Go]({{< relref "/ChapterFour/0001~0099/0061.Rotate-List.md" >}})|Medium| O(n)| O(1)||32.0%| |0075|Sort Colors|[Go]({{< relref "/ChapterFour/0001~0099/0075.Sort-Colors.md" >}})|Medium| O(n)| O(1)|❤️|50.0%| |0076|Minimum Window Substring|[Go]({{< relref "/ChapterFour/0001~0099/0076.Minimum-Window-Substring.md" >}})|Hard| O(n)| O(n)|❤️|36.3%| |0080|Remove Duplicates from Sorted Array II|[Go]({{< relref "/ChapterFour/0001~0099/0080.Remove-Duplicates-from-Sorted-Array-II.md" >}})|Medium| O(n)| O(1||46.5%| |0086|Partition List|[Go]({{< relref "/ChapterFour/0001~0099/0086.Partition-List.md" >}})|Medium| O(n)| O(1)|❤️|44.9%| |0088|Merge Sorted Array|[Go]({{< relref "/ChapterFour/0001~0099/0088.Merge-Sorted-Array.md" >}})|Easy| O(n)| O(1)|❤️|40.9%| -|0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0100~0199/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.6%| +|0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0100~0199/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.7%| |0141|Linked List Cycle|[Go]({{< relref "/ChapterFour/0100~0199/0141.Linked-List-Cycle.md" >}})|Easy| O(n)| O(1)|❤️|43.2%| |0142|Linked List Cycle II|[Go]({{< relref "/ChapterFour/0100~0199/0142.Linked-List-Cycle-II.md" >}})|Medium| O(n)| O(1)|❤️|40.1%| |0167|Two Sum II - Input array is sorted|[Go]({{< relref "/ChapterFour/0100~0199/0167.Two-Sum-II-Input-array-is-sorted.md" >}})|Easy| O(n)| O(1)||55.8%| @@ -76,15 +76,15 @@ weight: 3 |0845|Longest Mountain in Array|[Go]({{< relref "/ChapterFour/0800~0899/0845.Longest-Mountain-in-Array.md" >}})|Medium| O(n)| O(1) ||38.7%| |0881|Boats to Save People|[Go]({{< relref "/ChapterFour/0800~0899/0881.Boats-to-Save-People.md" >}})|Medium| O(n log n)| O(1) ||49.1%| |0904|Fruit Into Baskets|[Go]({{< relref "/ChapterFour/0900~0999/0904.Fruit-Into-Baskets.md" >}})|Medium| O(n log n)| O(1) ||43.0%| -|0923|3Sum With Multiplicity|[Go]({{< relref "/ChapterFour/0900~0999/0923.3Sum-With-Multiplicity.md" >}})|Medium| O(n^2)| O(n) ||40.9%| -|0925|Long Pressed Name|[Go]({{< relref "/ChapterFour/0900~0999/0925.Long-Pressed-Name.md" >}})|Easy| O(n)| O(1)||37.2%| +|0923|3Sum With Multiplicity|[Go]({{< relref "/ChapterFour/0900~0999/0923.3Sum-With-Multiplicity.md" >}})|Medium| O(n^2)| O(n) ||41.0%| +|0925|Long Pressed Name|[Go]({{< relref "/ChapterFour/0900~0999/0925.Long-Pressed-Name.md" >}})|Easy| O(n)| O(1)||37.1%| |0930|Binary Subarrays With Sum|[Go]({{< relref "/ChapterFour/0900~0999/0930.Binary-Subarrays-With-Sum.md" >}})|Medium| O(n)| O(n) |❤️|44.9%| |0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0900~0999/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||71.8%| |0986|Interval List Intersections|[Go]({{< relref "/ChapterFour/0900~0999/0986.Interval-List-Intersections.md" >}})|Medium| O(n)| O(1)||68.6%| |0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0900~0999/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n)|❤️|50.9%| -|1004|Max Consecutive Ones III|[Go]({{< relref "/ChapterFour/1000~1099/1004.Max-Consecutive-Ones-III.md" >}})|Medium| O(n)| O(1) ||60.9%| +|1004|Max Consecutive Ones III|[Go]({{< relref "/ChapterFour/1000~1099/1004.Max-Consecutive-Ones-III.md" >}})|Medium| O(n)| O(1) ||61.0%| |1093|Statistics from a Large Sample|[Go]({{< relref "/ChapterFour/1000~1099/1093.Statistics-from-a-Large-Sample.md" >}})|Medium| O(n)| O(1) ||48.6%| -|1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1200~1299/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.6%| +|1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1200~1299/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.7%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%| |1695|Maximum Erasure Value|[Go]({{< relref "/ChapterFour/1600~1699/1695.Maximum-Erasure-Value.md" >}})|Medium||||49.2%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Union_Find.md b/website/content/ChapterTwo/Union_Find.md index bebe59a6..482b5f57 100644 --- a/website/content/ChapterTwo/Union_Find.md +++ b/website/content/ChapterTwo/Union_Find.md @@ -28,7 +28,7 @@ weight: 16 |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard| O(n)| O(n)||33.2%| |0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium| O(n)| O(n)|❤️|52.5%| |0765|Couples Holding Hands|[Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}})|Hard| O(n)| O(n)|❤️|55.6%| -|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard| O(n^2)| O(n)|❤️|55.0%| +|0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard| O(n^2)| O(n)|❤️|55.1%| |0803|Bricks Falling When Hit|[Go]({{< relref "/ChapterFour/0800~0899/0803.Bricks-Falling-When-Hit.md" >}})|Hard| O(n^2)| O(n)|❤️|32.0%| |0839|Similar String Groups|[Go]({{< relref "/ChapterFour/0800~0899/0839.Similar-String-Groups.md" >}})|Hard| O(n^2)| O(n)||41.8%| |0924|Minimize Malware Spread|[Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}})|Hard| O(m\*n)| O(n)||41.9%|