diff --git a/README.md b/README.md index d85b8b65..fb98201e 100755 --- a/README.md +++ b/README.md @@ -125,16 +125,16 @@ | | Easy | Medium | Hard | Total | |:--------:|:--------:|:--------:|:--------:|:--------:| -|Optimizing|38|46|16|100| +|Optimizing|38|45|16|99| |Accepted|**249**|**320**|**96**|**665**| -|Total|458|904|368|1730| -|Perfection Rate|84.7%|85.6%|83.3%|85.0%| -|Completion Rate|54.4%|35.4%|26.1%|38.4%| +|Total|459|904|368|1731| +|Perfection Rate|84.7%|85.9%|83.3%|85.1%| +|Completion Rate|54.2%|35.4%|26.1%|38.4%| |------------|----------------------------|----------------------------|----------------------------|----------------------------| ## 二. 目录 -以下已经收录了 565 道题的题解,还有 13 道题在尝试优化到 beats 100% +以下已经收录了 566 道题的题解,还有 13 道题在尝试优化到 beats 100% | No. | Title | Solution | Acceptance | Difficulty | Frequency | |:--------:|:--------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:| @@ -157,7 +157,7 @@ |0017|Letter Combinations of a Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0017.Letter-Combinations-of-a-Phone-Number)|48.7%|Medium|| |0018|4Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0018.4Sum)|34.7%|Medium|| |0019|Remove Nth Node From End of List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0019.Remove-Nth-Node-From-End-of-List)|35.6%|Medium|| -|0020|Valid Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0020.Valid-Parentheses)|39.7%|Easy|| +|0020|Valid Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0020.Valid-Parentheses)|39.8%|Easy|| |0021|Merge Two Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0021.Merge-Two-Sorted-Lists)|55.7%|Easy|| |0022|Generate Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0022.Generate-Parentheses)|64.9%|Medium|| |0023|Merge k Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0023.Merge-k-Sorted-Lists)|42.0%|Hard|| @@ -174,7 +174,7 @@ |0034|Find First and Last Position of Element in Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0034.Find-First-and-Last-Position-of-Element-in-Sorted-Array)|37.1%|Medium|| |0035|Search Insert Position|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0035.Search-Insert-Position)|42.8%|Easy|| |0036|Valid Sudoku|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0036.Valid-Sudoku)|50.2%|Medium|| -|0037|Sudoku Solver|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0037.Sudoku-Solver)|46.0%|Hard|| +|0037|Sudoku Solver|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0037.Sudoku-Solver)|46.1%|Hard|| |0038|Count and Say||45.8%|Easy|| |0039|Combination Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0039.Combination-Sum)|58.8%|Medium|| |0040|Combination Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0040.Combination-Sum-II)|49.9%|Medium|| @@ -188,7 +188,7 @@ |0048|Rotate Image|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0048.Rotate-Image)|59.4%|Medium|| |0049|Group Anagrams|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0049.Group-Anagrams)|58.9%|Medium|| |0050|Pow(x, n)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0050.Pow(x,-n))|30.8%|Medium|| -|0051|N-Queens|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0051.N-Queens)|49.1%|Hard|| +|0051|N-Queens|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0051.N-Queens)|49.2%|Hard|| |0052|N-Queens II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0052.N-Queens-II)|59.8%|Hard|| |0053|Maximum Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0053.Maximum-Subarray)|47.6%|Easy|| |0054|Spiral Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0054.Spiral-Matrix)|35.6%|Medium|| @@ -209,7 +209,7 @@ |0069|Sqrt(x)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0069.Sqrt(x))|34.9%|Easy|| |0070|Climbing Stairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0070.Climbing-Stairs)|48.5%|Easy|| |0071|Simplify Path|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0071.Simplify-Path)|33.6%|Medium|| -|0072|Edit Distance||46.4%|Hard|| +|0072|Edit Distance||46.5%|Hard|| |0073|Set Matrix Zeroes||44.1%|Medium|| |0074|Search a 2D Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0074.Search-a-2D-Matrix)|37.4%|Medium|| |0075|Sort Colors|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0075.Sort-Colors)|49.0%|Medium|| @@ -221,13 +221,13 @@ |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.5%|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.0%|Medium|| |0083|Remove Duplicates from Sorted List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0083.Remove-Duplicates-from-Sorted-List)|46.3%|Easy|| -|0084|Largest Rectangle in Histogram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0084.Largest-Rectangle-in-Histogram)|36.8%|Hard|| +|0084|Largest Rectangle in Histogram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0084.Largest-Rectangle-in-Histogram)|36.9%|Hard|| |0085|Maximal Rectangle||39.2%|Hard|| |0086|Partition List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0086.Partition-List)|43.1%|Medium|| |0087|Scramble String||34.5%|Hard|| |0088|Merge Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0088.Merge-Sorted-Array)|40.6%|Easy|| |0089|Gray Code|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0089.Gray-Code)|50.1%|Medium|| -|0090|Subsets II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0090.Subsets-II)|48.5%|Medium|| +|0090|Subsets II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0090.Subsets-II)|48.6%|Medium|| |0091|Decode Ways|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0091.Decode-Ways)|26.3%|Medium|| |0092|Reverse Linked List II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0092.Reverse-Linked-List-II)|40.3%|Medium|| |0093|Restore IP Addresses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0093.Restore-IP-Addresses)|37.3%|Medium|| @@ -268,7 +268,7 @@ |0128|Longest Consecutive Sequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0128.Longest-Consecutive-Sequence)|46.1%|Hard|| |0129|Sum Root to Leaf Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0129.Sum-Root-to-Leaf-Numbers)|50.6%|Medium|| |0130|Surrounded Regions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0130.Surrounded-Regions)|29.2%|Medium|| -|0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|51.4%|Medium|| +|0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|51.5%|Medium|| |0132|Palindrome Partitioning II||31.0%|Hard|| |0133|Clone Graph||38.6%|Medium|| |0134|Gas Station||41.0%|Medium|| @@ -298,7 +298,7 @@ |0158|Read N Characters Given Read4 II - Call multiple times||36.4%|Hard|| |0159|Longest Substring with At Most Two Distinct Characters||50.3%|Medium|| |0160|Intersection of Two Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0160.Intersection-of-Two-Linked-Lists)|42.7%|Easy|| -|0161|One Edit Distance||32.8%|Medium|| +|0161|One Edit Distance||33.0%|Medium|| |0162|Find Peak Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0162.Find-Peak-Element)|43.8%|Medium|| |0163|Missing Ranges||26.5%|Easy|| |0164|Maximum Gap|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0164.Maximum-Gap)|36.6%|Hard|| @@ -312,7 +312,7 @@ |0172|Factorial Trailing Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0172.Factorial-Trailing-Zeroes)|38.4%|Easy|| |0173|Binary Search Tree Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0173.Binary-Search-Tree-Iterator)|59.7%|Medium|| |0174|Dungeon Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0174.Dungeon-Game)|33.2%|Hard|| -|0175|Combine Two Tables||63.5%|Easy|| +|0175|Combine Two Tables||63.6%|Easy|| |0176|Second Highest Salary||33.0%|Easy|| |0177|Nth Highest Salary||33.0%|Medium|| |0178|Rank Scores||49.4%|Medium|| @@ -323,9 +323,9 @@ |0183|Customers Who Never Order||56.3%|Easy|| |0184|Department Highest Salary||39.5%|Medium|| |0185|Department Top Three Salaries||38.2%|Hard|| -|0186|Reverse Words in a String II||45.1%|Medium|| +|0186|Reverse Words in a String II||45.2%|Medium|| |0187|Repeated DNA Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0187.Repeated-DNA-Sequences)|41.3%|Medium|| -|0188|Best Time to Buy and Sell Stock IV||29.3%|Hard|| +|0188|Best Time to Buy and Sell Stock IV||29.4%|Hard|| |0189|Rotate Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0189.Rotate-Array)|36.4%|Medium|| |0190|Reverse Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0190.Reverse-Bits)|41.7%|Easy|| |0191|Number of 1 Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0191.Number-of-1-Bits)|52.0%|Easy|| @@ -334,7 +334,7 @@ |0194|Transpose File||24.4%|Medium|| |0195|Tenth Line||32.9%|Easy|| |0196|Delete Duplicate Emails||44.5%|Easy|| -|0197|Rising Temperature||39.6%|Easy|| +|0197|Rising Temperature||39.7%|Easy|| |0198|House Robber|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0198.House-Robber)|42.8%|Medium|| |0199|Binary Tree Right Side View|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0199.Binary-Tree-Right-Side-View)|55.8%|Medium|| |0200|Number of Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0200.Number-of-Islands)|48.7%|Medium|| @@ -343,16 +343,16 @@ |0203|Remove Linked List Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0203.Remove-Linked-List-Elements)|39.1%|Easy|| |0204|Count Primes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0204.Count-Primes)|32.1%|Easy|| |0205|Isomorphic Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0205.Isomorphic-Strings)|40.4%|Easy|| -|0206|Reverse Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0206.Reverse-Linked-List)|64.8%|Easy|| +|0206|Reverse Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0206.Reverse-Linked-List)|64.9%|Easy|| |0207|Course Schedule|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0207.Course-Schedule)|44.3%|Medium|| |0208|Implement Trie (Prefix Tree)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0208.Implement-Trie-(Prefix-Tree))|51.6%|Medium|| |0209|Minimum Size Subarray Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0209.Minimum-Size-Subarray-Sum)|39.2%|Medium|| |0210|Course Schedule II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0210.Course-Schedule-II)|42.3%|Medium|| -|0211|Design Add and Search Words Data Structure|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0211.Design-Add-and-Search-Words-Data-Structure)|39.8%|Medium|| +|0211|Design Add and Search Words Data Structure|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0211.Design-Add-and-Search-Words-Data-Structure)|39.9%|Medium|| |0212|Word Search II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0212.Word-Search-II)|36.6%|Hard|| |0213|House Robber II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0213.House-Robber-II)|37.4%|Medium|| |0214|Shortest Palindrome||30.5%|Hard|| -|0215|Kth Largest Element in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0215.Kth-Largest-Element-in-an-Array)|58.0%|Medium|| +|0215|Kth Largest Element in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0215.Kth-Largest-Element-in-an-Array)|58.1%|Medium|| |0216|Combination Sum III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0216.Combination-Sum-III)|60.0%|Medium|| |0217|Contains Duplicate|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0217.Contains-Duplicate)|56.5%|Easy|| |0218|The Skyline Problem|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0218.The-Skyline-Problem)|36.1%|Hard|| @@ -363,10 +363,10 @@ |0223|Rectangle Area|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0223.Rectangle-Area)|38.1%|Medium|| |0224|Basic Calculator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0224.Basic-Calculator)|38.0%|Hard|| |0225|Implement Stack using Queues|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0225.Implement-Stack-using-Queues)|47.0%|Easy|| -|0226|Invert Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0226.Invert-Binary-Tree)|66.6%|Easy|| +|0226|Invert Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0226.Invert-Binary-Tree)|66.7%|Easy|| |0227|Basic Calculator II||38.4%|Medium|| |0228|Summary Ranges|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0228.Summary-Ranges)|42.1%|Easy|| -|0229|Majority Element II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0229.Majority-Element-II)|38.5%|Medium|| +|0229|Majority Element II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0229.Majority-Element-II)|38.6%|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)|62.2%|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)|51.7%|Easy|| @@ -374,8 +374,8 @@ |0234|Palindrome Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0234.Palindrome-Linked-List)|40.3%|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)|51.4%|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)|48.2%|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)|66.3%|Easy|| -|0238|Product of Array Except Self||61.2%|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)|66.4%|Easy|| +|0238|Product of Array Except Self||61.3%|Medium|| |0239|Sliding Window Maximum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0239.Sliding-Window-Maximum)|44.5%|Hard|| |0240|Search a 2D Matrix II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0240.Search-a-2D-Matrix-II)|44.2%|Medium|| |0241|Different Ways to Add Parentheses||57.0%|Medium|| @@ -386,7 +386,7 @@ |0246|Strobogrammatic Number||45.7%|Easy|| |0247|Strobogrammatic Number II||48.3%|Medium|| |0248|Strobogrammatic Number III||40.1%|Hard|| -|0249|Group Shifted Strings||57.6%|Medium|| +|0249|Group Shifted Strings||57.7%|Medium|| |0250|Count Univalue Subtrees||53.1%|Medium|| |0251|Flatten 2D Vector||46.3%|Medium|| |0252|Meeting Rooms||55.3%|Easy|| @@ -396,7 +396,7 @@ |0256|Paint House||53.3%|Medium|| |0257|Binary Tree Paths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0257.Binary-Tree-Paths)|53.2%|Easy|| |0258|Add Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0258.Add-Digits)|58.4%|Easy|| -|0259|3Sum Smaller||48.7%|Medium|| +|0259|3Sum Smaller||48.8%|Medium|| |0260|Single Number III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0260.Single-Number-III)|65.3%|Medium|| |0261|Graph Valid Tree||43.0%|Medium|| |0262|Trips and Users||35.6%|Hard|| @@ -440,17 +440,17 @@ |0300|Longest Increasing Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0300.Longest-Increasing-Subsequence)|43.7%|Medium|| |0301|Remove Invalid Parentheses||44.4%|Hard|| |0302|Smallest Rectangle Enclosing Black Pixels||52.3%|Hard|| -|0303|Range Sum Query - Immutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0303.Range-Sum-Query---Immutable)|47.1%|Easy|| +|0303|Range Sum Query - Immutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0303.Range-Sum-Query---Immutable)|47.2%|Easy|| |0304|Range Sum Query 2D - Immutable||40.3%|Medium|| |0305|Number of Islands II||39.8%|Hard|| |0306|Additive Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0306.Additive-Number)|29.6%|Medium|| -|0307|Range Sum Query - Mutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0307.Range-Sum-Query---Mutable)|36.6%|Medium|| +|0307|Range Sum Query - Mutable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0307.Range-Sum-Query---Mutable)|36.5%|Medium|| |0308|Range Sum Query 2D - Mutable||37.3%|Hard|| |0309|Best Time to Buy and Sell Stock with Cooldown|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown)|48.1%|Medium|| |0310|Minimum Height Trees||34.5%|Medium|| |0311|Sparse Matrix Multiplication||63.7%|Medium|| |0312|Burst Balloons||53.6%|Hard|| -|0313|Super Ugly Number||45.9%|Medium|| +|0313|Super Ugly Number||46.0%|Medium|| |0314|Binary Tree Vertical Order Traversal||46.7%|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.6%|Hard|| |0316|Remove Duplicate Letters||38.9%|Medium|| @@ -460,7 +460,7 @@ |0320|Generalized Abbreviation||53.4%|Medium|| |0321|Create Maximum Number||27.4%|Hard|| |0322|Coin Change|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0322.Coin-Change)|37.0%|Medium|| -|0323|Number of Connected Components in an Undirected Graph||57.4%|Medium|| +|0323|Number of Connected Components in an Undirected Graph||57.5%|Medium|| |0324|Wiggle Sort II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0324.Wiggle-Sort-II)|30.6%|Medium|| |0325|Maximum Size Subarray Sum Equals k||47.3%|Medium|| |0326|Power of Three|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0326.Power-of-Three)|42.1%|Easy|| @@ -488,7 +488,7 @@ |0348|Design Tic-Tac-Toe||55.4%|Medium|| |0349|Intersection of Two Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0349.Intersection-of-Two-Arrays)|64.4%|Easy|| |0350|Intersection of Two Arrays II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0350.Intersection-of-Two-Arrays-II)|51.9%|Easy|| -|0351|Android Unlock Patterns||49.4%|Medium|| +|0351|Android Unlock Patterns||49.5%|Medium|| |0352|Data Stream as Disjoint Intervals||48.4%|Hard|| |0353|Design Snake Game||35.2%|Medium|| |0354|Russian Doll Envelopes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0354.Russian-Doll-Envelopes)|36.1%|Hard|| @@ -498,9 +498,9 @@ |0358|Rearrange String k Distance Apart||35.6%|Hard|| |0359|Logger Rate Limiter||72.0%|Easy|| |0360|Sort Transformed Array||49.5%|Medium|| -|0361|Bomb Enemy||46.5%|Medium|| +|0361|Bomb Enemy||46.6%|Medium|| |0362|Design Hit Counter||65.0%|Medium|| -|0363|Max Sum of Rectangle No Larger Than K||38.4%|Hard|| +|0363|Max Sum of Rectangle No Larger Than K||38.3%|Hard|| |0364|Nested List Weight Sum II||63.5%|Medium|| |0365|Water and Jug Problem||31.0%|Medium|| |0366|Find Leaves of Binary Tree||71.6%|Medium|| @@ -536,7 +536,7 @@ |0396|Rotate Function||36.7%|Medium|| |0397|Integer Replacement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0397.Integer-Replacement)|33.4%|Medium|| |0398|Random Pick Index||57.6%|Medium|| -|0399|Evaluate Division|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0399.Evaluate-Division)|54.0%|Medium|| +|0399|Evaluate Division|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0399.Evaluate-Division)|54.1%|Medium|| |0400|Nth Digit||32.3%|Medium|| |0401|Binary Watch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0401.Binary-Watch)|48.3%|Easy|| |0402|Remove K Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0402.Remove-K-Digits)|28.6%|Medium|| @@ -551,20 +551,20 @@ |0411|Minimum Unique Word Abbreviation||37.1%|Hard|| |0412|Fizz Buzz|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0412.Fizz-Buzz)|63.5%|Easy|| |0413|Arithmetic Slices||58.5%|Medium|| -|0414|Third Maximum Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0414.Third-Maximum-Number)|30.6%|Easy|| +|0414|Third Maximum Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0414.Third-Maximum-Number)|30.7%|Easy|| |0415|Add Strings||48.1%|Easy|| |0416|Partition Equal Subset Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0416.Partition-Equal-Subset-Sum)|44.8%|Medium|| |0417|Pacific Atlantic Water Flow||42.4%|Medium|| |0418|Sentence Screen Fitting||33.0%|Medium|| |0419|Battleships in a Board||70.9%|Medium|| |0420|Strong Password Checker||13.8%|Hard|| -|0421|Maximum XOR of Two Numbers in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0421.Maximum-XOR-of-Two-Numbers-in-an-Array)|53.9%|Medium|| +|0421|Maximum XOR of Two Numbers in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0421.Maximum-XOR-of-Two-Numbers-in-an-Array)|54.0%|Medium|| |0422|Valid Word Square||38.1%|Easy|| |0423|Reconstruct Original Digits from English||47.4%|Medium|| |0424|Longest Repeating Character Replacement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0424.Longest-Repeating-Character-Replacement)|48.0%|Medium|| -|0425|Word Squares||49.9%|Hard|| +|0425|Word Squares||50.0%|Hard|| |0426|Convert Binary Search Tree to Sorted Doubly Linked List||60.9%|Medium|| -|0427|Construct Quad Tree||62.5%|Medium|| +|0427|Construct Quad Tree||62.4%|Medium|| |0428|Serialize and Deserialize N-ary Tree||61.2%|Hard|| |0429|N-ary Tree Level Order Traversal||66.4%|Medium|| |0430|Flatten a Multilevel Doubly Linked List||56.7%|Medium|| @@ -597,10 +597,10 @@ |0457|Circular Array Loop|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0457.Circular-Array-Loop)|30.0%|Medium|| |0458|Poor Pigs||54.5%|Hard|| |0459|Repeated Substring Pattern||43.3%|Easy|| -|0460|LFU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0460.LFU-Cache)|35.7%|Hard|| +|0460|LFU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0460.LFU-Cache)|35.8%|Hard|| |0461|Hamming Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0461.Hamming-Distance)|73.1%|Easy|| |0462|Minimum Moves to Equal Array Elements II||54.3%|Medium|| -|0463|Island Perimeter|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0463.Island-Perimeter)|66.5%|Easy|| +|0463|Island Perimeter|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0463.Island-Perimeter)|66.6%|Easy|| |0464|Can I Win||29.6%|Medium|| |0465|Optimal Account Balancing||48.1%|Hard|| |0466|Count The Repetitions||28.6%|Hard|| @@ -612,7 +612,7 @@ |0472|Concatenated Words||44.5%|Hard|| |0473|Matchsticks to Square||38.2%|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.5%|Medium|| +|0475|Heaters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0475.Heaters)|33.6%|Medium|| |0476|Number Complement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0476.Number-Complement)|65.1%|Easy|| |0477|Total Hamming Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0477.Total-Hamming-Distance)|50.6%|Medium|| |0478|Generate Random Point in a Circle||39.0%|Medium|| @@ -634,7 +634,7 @@ |0494|Target Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0494.Target-Sum)|45.8%|Medium|| |0495|Teemo Attacking||56.1%|Medium|| |0496|Next Greater Element I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0496.Next-Greater-Element-I)|65.2%|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|| +|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.0%|Medium|| |0498|Diagonal Traverse|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0498.Diagonal-Traverse)|50.1%|Medium|| |0499|The Maze III||42.3%|Hard|| |0500|Keyboard Row|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0500.Keyboard-Row)|65.5%|Easy|| @@ -650,7 +650,7 @@ |0510|Inorder Successor in BST II||59.9%|Medium|| |0511|Game Play Analysis I||81.2%|Easy|| |0512|Game Play Analysis II||55.8%|Easy|| -|0513|Find Bottom Left Tree Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0513.Find-Bottom-Left-Tree-Value)|62.4%|Medium|| +|0513|Find Bottom Left Tree Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0513.Find-Bottom-Left-Tree-Value)|62.3%|Medium|| |0514|Freedom Trail||44.8%|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.0%|Medium|| |0516|Longest Palindromic Subsequence||55.0%|Medium|| @@ -665,13 +665,13 @@ |0525|Contiguous Array||43.4%|Medium|| |0526|Beautiful Arrangement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0526.Beautiful-Arrangement)|61.7%|Medium|| |0527|Word Abbreviation||56.0%|Hard|| -|0528|Random Pick with Weight|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0528.Random-Pick-with-Weight)|44.5%|Medium|| +|0528|Random Pick with Weight|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0528.Random-Pick-with-Weight)|44.6%|Medium|| |0529|Minesweeper|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0529.Minesweeper)|60.7%|Medium|| |0530|Minimum Absolute Difference in BST||54.7%|Easy|| |0531|Lonely Pixel I||59.4%|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)|34.9%|Medium|| -|0533|Lonely Pixel II||48.0%|Medium|| -|0534|Game Play Analysis III||78.7%|Medium|| +|0533|Lonely Pixel II||48.1%|Medium|| +|0534|Game Play Analysis III||78.8%|Medium|| |0535|Encode and Decode TinyURL||80.8%|Medium|| |0536|Construct Binary Tree from String||50.4%|Medium|| |0537|Complex Number Multiplication|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0537.Complex-Number-Multiplication)|68.3%|Medium|| @@ -679,7 +679,7 @@ |0539|Minimum Time Difference||52.2%|Medium|| |0540|Single Element in a Sorted Array||57.9%|Medium|| |0541|Reverse String II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0541.Reverse-String-II)|49.0%|Easy|| -|0542|01 Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0542.01-Matrix)|40.6%|Medium|| +|0542|01 Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0542.01-Matrix)|40.7%|Medium|| |0543|Diameter of Binary Tree||49.1%|Easy|| |0544|Output Contest Matches||75.7%|Medium|| |0545|Boundary of Binary Tree||39.5%|Medium|| @@ -687,10 +687,10 @@ |0547|Number of Provinces|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0547.Number-of-Provinces)|60.2%|Medium|| |0548|Split Array with Equal Sum||47.7%|Medium|| |0549|Binary Tree Longest Consecutive Sequence II||47.2%|Medium|| -|0550|Game Play Analysis IV||46.0%|Medium|| +|0550|Game Play Analysis IV||45.9%|Medium|| |0551|Student Attendance Record I||46.1%|Easy|| |0552|Student Attendance Record II||37.2%|Hard|| -|0553|Optimal Division||57.3%|Medium|| +|0553|Optimal Division||57.4%|Medium|| |0554|Brick Wall||50.6%|Medium|| |0555|Split Concatenated Strings||42.8%|Medium|| |0556|Next Greater Element III||33.5%|Medium|| @@ -698,7 +698,7 @@ |0558|Logical OR of Two Binary Grids Represented as Quad-Trees||45.5%|Medium|| |0559|Maximum Depth of N-ary Tree||69.4%|Easy|| |0560|Subarray Sum Equals K||43.8%|Medium|| -|0561|Array Partition I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0561.Array-Partition-I)|72.9%|Easy|| +|0561|Array Partition I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0561.Array-Partition-I)|73.0%|Easy|| |0562|Longest Line of Consecutive One in Matrix||46.2%|Medium|| |0563|Binary Tree Tilt|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0563.Binary-Tree-Tilt)|52.7%|Easy|| |0564|Find the Closest Palindrome||20.2%|Hard|| @@ -711,19 +711,19 @@ |0571|Find Median Given Frequency of Numbers||45.6%|Hard|| |0572|Subtree of Another Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0572.Subtree-of-Another-Tree)|44.4%|Easy|| |0573|Squirrel Simulation||56.0%|Medium|| -|0574|Winning Candidate||51.3%|Medium|| +|0574|Winning Candidate||51.4%|Medium|| |0575|Distribute Candies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0575.Distribute-Candies)|61.9%|Easy|| |0576|Out of Boundary Paths||35.8%|Medium|| |0577|Employee Bonus||70.9%|Easy|| -|0578|Get Highest Answer Rate Question||41.3%|Medium|| +|0578|Get Highest Answer Rate Question||41.4%|Medium|| |0579|Find Cumulative Salary of an Employee||38.1%|Hard|| -|0580|Count Student Number in Departments||51.1%|Medium|| +|0580|Count Student Number in Departments||51.2%|Medium|| |0581|Shortest Unsorted Continuous Subarray||31.7%|Medium|| |0582|Kill Process||62.5%|Medium|| |0583|Delete Operation for Two Strings||49.8%|Medium|| |0584|Find Customer Referee||73.8%|Easy|| |0585|Investments in 2016||56.5%|Medium|| -|0586|Customer Placing the Largest Number of Orders||75.0%|Easy|| +|0586|Customer Placing the Largest Number of Orders||75.1%|Easy|| |0587|Erect the Fence||36.3%|Hard|| |0588|Design In-Memory File System||46.5%|Hard|| |0589|N-ary Tree Preorder Traversal||73.1%|Easy|| @@ -731,7 +731,7 @@ |0591|Tag Validator||34.7%|Hard|| |0592|Fraction Addition and Subtraction||50.1%|Medium|| |0593|Valid Square||43.3%|Medium|| -|0594|Longest Harmonious Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0594.Longest-Harmonious-Subsequence)|47.8%|Easy|| +|0594|Longest Harmonious Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0594.Longest-Harmonious-Subsequence)|47.7%|Easy|| |0595|Big Countries||78.3%|Easy|| |0596|Classes More Than 5 Students||38.7%|Easy|| |0597|Friend Requests I: Overall Acceptance Rate||41.7%|Easy|| @@ -751,12 +751,12 @@ |0611|Valid Triangle Number||49.1%|Medium|| |0612|Shortest Distance in a Plane||61.0%|Medium|| |0613|Shortest Distance in a Line||79.2%|Easy|| -|0614|Second Degree Follower||32.2%|Medium|| +|0614|Second Degree Follower||32.3%|Medium|| |0615|Average Salary: Departments VS Company||51.7%|Hard|| |0616|Add Bold Tag in String||44.5%|Medium|| |0617|Merge Two Binary Trees||75.2%|Easy|| |0618|Students Report By Geography||59.0%|Hard|| -|0619|Biggest Single Number||44.6%|Easy|| +|0619|Biggest Single Number||44.7%|Easy|| |0620|Not Boring Movies||69.4%|Easy|| |0621|Task Scheduler||51.5%|Medium|| |0622|Design Circular Queue||45.1%|Medium|| @@ -768,13 +768,13 @@ |0628|Maximum Product of Three Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0628.Maximum-Product-of-Three-Numbers)|47.0%|Easy|| |0629|K Inverse Pairs Array||31.6%|Hard|| |0630|Course Schedule III||33.7%|Hard|| -|0631|Design Excel Sum Formula||32.0%|Hard|| +|0631|Design Excel Sum Formula||32.1%|Hard|| |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.0%|Hard|| |0633|Sum of Square Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0633.Sum-of-Square-Numbers)|32.5%|Medium|| |0634|Find the Derangement of An Array||40.4%|Medium|| |0635|Design Log Storage System||59.5%|Medium|| |0636|Exclusive Time of Functions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0636.Exclusive-Time-of-Functions)|54.0%|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)|64.5%|Easy|| +|0637|Average of Levels in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0637.Average-of-Levels-in-Binary-Tree)|64.6%|Easy|| |0638|Shopping Offers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0638.Shopping-Offers)|52.6%|Medium|| |0639|Decode Ways II||27.5%|Hard|| |0640|Solve the Equation||42.6%|Medium|| @@ -796,20 +796,20 @@ |0656|Coin Path||29.6%|Hard|| |0657|Robot Return to Origin||73.6%|Easy|| |0658|Find K Closest Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0658.Find-K-Closest-Elements)|41.8%|Medium|| -|0659|Split Array into Consecutive Subsequences||44.2%|Medium|| +|0659|Split Array into Consecutive Subsequences||44.3%|Medium|| |0660|Remove 9||54.1%|Hard|| |0661|Image Smoother|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0661.Image-Smoother)|52.2%|Easy|| |0662|Maximum Width of Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0662.Maximum-Width-of-Binary-Tree)|40.0%|Medium|| |0663|Equal Tree Partition||39.7%|Medium|| -|0664|Strange Printer||41.2%|Hard|| +|0664|Strange Printer||41.3%|Hard|| |0665|Non-decreasing Array||19.6%|Easy|| |0666|Path Sum IV||55.6%|Medium|| |0667|Beautiful Arrangement II||55.0%|Medium|| |0668|Kth Smallest Number in Multiplication Table|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0668.Kth-Smallest-Number-in-Multiplication-Table)|47.7%|Hard|| -|0669|Trim a Binary Search Tree||63.4%|Easy|| +|0669|Trim a Binary Search Tree||63.3%|Easy|| |0670|Maximum Swap||44.9%|Medium|| |0671|Second Minimum Node In a Binary Tree||42.8%|Easy|| -|0672|Bulb Switcher II||51.1%|Medium|| +|0672|Bulb Switcher II||51.0%|Medium|| |0673|Number of Longest Increasing Subsequence||38.4%|Medium|| |0674|Longest Continuous Increasing Subsequence||46.0%|Easy|| |0675|Cut Off Trees for Golf Event||35.2%|Hard|| @@ -830,12 +830,12 @@ |0690|Employee Importance||58.4%|Easy|| |0691|Stickers to Spell Word||44.3%|Hard|| |0692|Top K Frequent Words||52.9%|Medium|| -|0693|Binary Number with Alternating Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0693.Binary-Number-with-Alternating-Bits)|59.7%|Easy|| +|0693|Binary Number with Alternating Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0693.Binary-Number-with-Alternating-Bits)|59.8%|Easy|| |0694|Number of Distinct Islands||57.4%|Medium|| |0695|Max Area of Island|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0695.Max-Area-of-Island)|64.4%|Medium|| |0696|Count Binary Substrings||57.3%|Easy|| |0697|Degree of an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0697.Degree-of-an-Array)|54.4%|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)|42.4%|Hard|| |0700|Search in a Binary Search Tree||73.4%|Easy|| |0701|Insert into a Binary Search Tree||75.9%|Medium|| @@ -860,7 +860,7 @@ |0720|Longest Word in Dictionary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0720.Longest-Word-in-Dictionary)|49.1%|Easy|| |0721|Accounts Merge|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0721.Accounts-Merge)|51.3%|Medium|| |0722|Remove Comments||35.9%|Medium|| -|0723|Candy Crush||72.4%|Medium|| +|0723|Candy Crush||72.5%|Medium|| |0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|45.1%|Easy|| |0725|Split Linked List in Parts|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0725.Split-Linked-List-in-Parts)|52.8%|Medium|| |0726|Number of Atoms|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0726.Number-of-Atoms)|51.0%|Hard|| @@ -887,14 +887,14 @@ |0747|Largest Number At Least Twice of Others||42.8%|Easy|| |0748|Shortest Completing Word|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0748.Shortest-Completing-Word)|57.4%|Easy|| |0749|Contain Virus||47.9%|Hard|| -|0750|Number Of Corner Rectangles||66.6%|Medium|| -|0751|IP to CIDR||60.1%|Medium|| -|0752|Open the Lock||52.5%|Medium|| +|0750|Number Of Corner Rectangles||66.7%|Medium|| +|0751|IP to CIDR||60.0%|Medium|| +|0752|Open the Lock||52.6%|Medium|| |0753|Cracking the Safe|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0753.Cracking-the-Safe)|52.1%|Hard|| |0754|Reach a Number||40.5%|Medium|| |0755|Pour Water||44.0%|Medium|| |0756|Pyramid Transition Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0756.Pyramid-Transition-Matrix)|55.4%|Medium|| -|0757|Set Intersection Size At Least Two||42.1%|Hard|| +|0757|Set Intersection Size At Least Two||42.2%|Hard|| |0758|Bold Words in String||47.2%|Easy|| |0759|Employee Free Time||67.9%|Hard|| |0760|Find Anagram Mappings||81.7%|Easy|| @@ -909,7 +909,7 @@ |0769|Max Chunks To Make Sorted||55.5%|Medium|| |0770|Basic Calculator IV||54.4%|Hard|| |0771|Jewels and Stones|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0771.Jewels-and-Stones)|86.8%|Easy|| -|0772|Basic Calculator III||43.2%|Hard|| +|0772|Basic Calculator III||43.3%|Hard|| |0773|Sliding Puzzle||60.5%|Hard|| |0774|Minimize Max Distance to Gas Station||48.1%|Hard|| |0775|Global and Local Inversions||42.5%|Medium|| @@ -949,7 +949,7 @@ |0809|Expressive Words||46.6%|Medium|| |0810|Chalkboard XOR Game||49.4%|Hard|| |0811|Subdomain Visit Count|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0811.Subdomain-Visit-Count)|71.2%|Easy|| -|0812|Largest Triangle Area|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0812.Largest-Triangle-Area)|58.8%|Easy|| +|0812|Largest Triangle Area|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0812.Largest-Triangle-Area)|58.9%|Easy|| |0813|Largest Sum of Averages||50.9%|Medium|| |0814|Binary Tree Pruning||72.9%|Medium|| |0815|Bus Routes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0815.Bus-Routes)|43.3%|Hard|| @@ -959,10 +959,10 @@ |0819|Most Common Word|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0819.Most-Common-Word)|45.4%|Easy|| |0820|Short Encoding of Words||51.4%|Medium|| |0821|Shortest Distance to a Character||67.8%|Easy|| -|0822|Card Flipping Game||43.5%|Medium|| +|0822|Card Flipping Game||43.6%|Medium|| |0823|Binary Trees With Factors||36.4%|Medium|| -|0824|Goat Latin||66.3%|Easy|| -|0825|Friends Of Appropriate Ages||43.8%|Medium|| +|0824|Goat Latin||66.4%|Easy|| +|0825|Friends Of Appropriate Ages||43.9%|Medium|| |0826|Most Profit Assigning Work|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0826.Most-Profit-Assigning-Work)|39.0%|Medium|| |0827|Making A Large Island||47.1%|Hard|| |0828|Count Unique Characters of All Substrings of a Given String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0828.Count-Unique-Characters-of-All-Substrings-of-a-Given-String)|46.8%|Hard|| @@ -1001,7 +1001,7 @@ |0861|Score After Flipping Matrix||73.5%|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.1%|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)|57.5%|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)|41.5%|Hard|| +|0864|Shortest Path to Get All Keys|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0864.Shortest-Path-to-Get-All-Keys)|41.6%|Hard|| |0865|Smallest Subtree with all the Deepest Nodes||64.7%|Medium|| |0866|Prime Palindrome||25.1%|Medium|| |0867|Transpose Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0867.Transpose-Matrix)|62.2%|Easy|| @@ -1009,12 +1009,12 @@ |0869|Reordered Power of 2||54.1%|Medium|| |0870|Advantage Shuffle||46.6%|Medium|| |0871|Minimum Number of Refueling Stops||32.1%|Hard|| -|0872|Leaf-Similar Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0872.Leaf-Similar-Trees)|64.5%|Easy|| +|0872|Leaf-Similar Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0872.Leaf-Similar-Trees)|64.6%|Easy|| |0873|Length of Longest Fibonacci Subsequence||48.1%|Medium|| |0874|Walking Robot Simulation||36.7%|Easy|| |0875|Koko Eating Bananas|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0875.Koko-Eating-Bananas)|53.4%|Medium|| |0876|Middle of the Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0876.Middle-of-the-Linked-List)|68.9%|Easy|| -|0877|Stone Game||66.3%|Medium|| +|0877|Stone Game||66.4%|Medium|| |0878|Nth Magical Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0878.Nth-Magical-Number)|28.9%|Hard|| |0879|Profitable Schemes||40.1%|Hard|| |0880|Decoded String at Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0880.Decoded-String-at-Index)|28.3%|Medium|| @@ -1045,20 +1045,20 @@ |0905|Sort Array By Parity||75.0%|Easy|| |0906|Super Palindromes||32.9%|Hard|| |0907|Sum of Subarray Minimums|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0907.Sum-of-Subarray-Minimums)|33.2%|Medium|| -|0908|Smallest Range I||66.4%|Easy|| -|0909|Snakes and Ladders||39.1%|Medium|| +|0908|Smallest Range I||66.3%|Easy|| +|0909|Snakes and Ladders||39.2%|Medium|| |0910|Smallest Range II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0910.Smallest-Range-II)|31.2%|Medium|| |0911|Online Election|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0911.Online-Election)|51.2%|Medium|| |0912|Sort an Array||64.5%|Medium|| |0913|Cat and Mouse||34.6%|Hard|| -|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)|34.4%|Easy|| +|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)|34.3%|Easy|| |0915|Partition Array into Disjoint Intervals||46.0%|Medium|| |0916|Word Subsets||48.1%|Medium|| |0917|Reverse Only Letters||58.6%|Easy|| |0918|Maximum Sum Circular Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0918.Maximum-Sum-Circular-Subarray)|34.1%|Medium|| |0919|Complete Binary Tree Inserter||58.6%|Medium|| -|0920|Number of Music Playlists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0920.Number-of-Music-Playlists)|47.6%|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)|74.6%|Medium|| +|0920|Number of Music Playlists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0920.Number-of-Music-Playlists)|47.7%|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)|74.7%|Medium|| |0922|Sort Array By Parity II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0922.Sort-Array-By-Parity-II)|70.3%|Easy|| |0923|3Sum With Multiplicity|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0923.3Sum-With-Multiplicity)|36.1%|Medium|| |0924|Minimize Malware Spread|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0924.Minimize-Malware-Spread)|41.8%|Hard|| @@ -1083,7 +1083,7 @@ |0943|Find the Shortest Superstring||43.5%|Hard|| |0944|Delete Columns to Make Sorted||71.1%|Easy|| |0945|Minimum Increment to Make Array Unique||46.6%|Medium|| -|0946|Validate Stack Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0946.Validate-Stack-Sequences)|63.4%|Medium|| +|0946|Validate Stack Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0946.Validate-Stack-Sequences)|63.5%|Medium|| |0947|Most Stones Removed with Same Row or Column|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0947.Most-Stones-Removed-with-Same-Row-or-Column)|55.5%|Medium|| |0948|Bag of Tokens||46.1%|Medium|| |0949|Largest Time for Given Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0949.Largest-Time-for-Given-Digits)|36.2%|Medium|| @@ -1119,8 +1119,8 @@ |0979|Distribute Coins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0979.Distribute-Coins-in-Binary-Tree)|69.5%|Medium|| |0980|Unique Paths III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0980.Unique-Paths-III)|77.2%|Hard|| |0981|Time Based Key-Value Store|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0981.Time-Based-Key-Value-Store)|54.0%|Medium|| -|0982|Triples with Bitwise AND Equal To Zero||56.1%|Hard|| -|0983|Minimum Cost For Tickets||62.7%|Medium|| +|0982|Triples with Bitwise AND Equal To Zero||56.2%|Hard|| +|0983|Minimum Cost For Tickets||62.6%|Medium|| |0984|String Without AAA or BBB|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0984.String-Without-AAA-or-BBB)|38.5%|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.7%|Easy|| |0986|Interval List Intersections|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0986.Interval-List-Intersections)|68.1%|Medium|| @@ -1136,7 +1136,7 @@ |0996|Number of Squareful Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0996.Number-of-Squareful-Arrays)|48.0%|Hard|| |0997|Find the Town Judge||49.8%|Easy|| |0998|Maximum Binary Tree II||63.7%|Medium|| -|0999|Available Captures for Rook|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0999.Available-Captures-for-Rook)|66.9%|Easy|| +|0999|Available Captures for Rook|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0999.Available-Captures-for-Rook)|67.0%|Easy|| |1000|Minimum Cost to Merge Stones||40.4%|Hard|| |1001|Grid Illumination||36.6%|Hard|| |1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.2%|Easy|| @@ -1149,23 +1149,23 @@ |1009|Complement of Base 10 Integer||61.5%|Easy|| |1010|Pairs of Songs With Total Durations Divisible by 60||49.9%|Medium|| |1011|Capacity To Ship Packages Within D Days|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1011.Capacity-To-Ship-Packages-Within-D-Days)|59.6%|Medium|| -|1012|Numbers With Repeated Digits||37.8%|Hard|| +|1012|Numbers With Repeated Digits||37.7%|Hard|| |1013|Partition Array Into Three Parts With Equal Sum||49.3%|Easy|| |1014|Best Sightseeing Pair||52.8%|Medium|| |1015|Smallest Integer Divisible by K||41.8%|Medium|| |1016|Binary String With Substrings Representing 1 To N||59.0%|Medium|| -|1017|Convert to Base -2|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1017.Convert-to-Base--2)|59.5%|Medium|| +|1017|Convert to Base -2|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1017.Convert-to-Base--2)|59.6%|Medium|| |1018|Binary Prefix Divisible By 5|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1018.Binary-Prefix-Divisible-By-5)|47.8%|Easy|| |1019|Next Greater Node In Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1019.Next-Greater-Node-In-Linked-List)|58.2%|Medium|| |1020|Number of Enclaves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1020.Number-of-Enclaves)|58.7%|Medium|| |1021|Remove Outermost Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1021.Remove-Outermost-Parentheses)|78.7%|Easy|| -|1022|Sum of Root To Leaf Binary Numbers||71.4%|Easy|| +|1022|Sum of Root To Leaf Binary Numbers||71.5%|Easy|| |1023|Camelcase Matching||57.3%|Medium|| -|1024|Video Stitching||49.1%|Medium|| +|1024|Video Stitching||49.0%|Medium|| |1025|Divisor Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1025.Divisor-Game)|66.1%|Easy|| |1026|Maximum Difference Between Node and Ancestor|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1026.Maximum-Difference-Between-Node-and-Ancestor)|69.2%|Medium|| -|1027|Longest Arithmetic Subsequence||49.8%|Medium|| -|1028|Recover a Tree From Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1028.Recover-a-Tree-From-Preorder-Traversal)|70.7%|Hard|| +|1027|Longest Arithmetic Subsequence||49.9%|Medium|| +|1028|Recover a Tree From Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1028.Recover-a-Tree-From-Preorder-Traversal)|70.8%|Hard|| |1029|Two City Scheduling||57.7%|Medium|| |1030|Matrix Cells in Distance Order|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1030.Matrix-Cells-in-Distance-Order)|66.9%|Easy|| |1031|Maximum Sum of Two Non-Overlapping Subarrays||58.8%|Medium|| @@ -1186,7 +1186,7 @@ |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)|70.3%|Easy|| |1048|Longest String Chain||55.3%|Medium|| -|1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|45.0%|Medium|| +|1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|45.1%|Medium|| |1050|Actors and Directors Who Cooperated At Least Three Times||72.2%|Easy|| |1051|Height Checker|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1051.Height-Checker)|72.0%|Easy|| |1052|Grumpy Bookstore Owner|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1052.Grumpy-Bookstore-Owner)|55.7%|Medium|| @@ -1195,16 +1195,16 @@ |1055|Shortest Way to Form String||57.1%|Medium|| |1056|Confusing Number||47.1%|Easy|| |1057|Campus Bikes||57.6%|Medium|| -|1058|Minimize Rounding Error to Meet Target||43.2%|Medium|| +|1058|Minimize Rounding Error to Meet Target||43.1%|Medium|| |1059|All Paths from Source Lead to Destination||43.2%|Medium|| |1060|Missing Element in Sorted Array||54.7%|Medium|| |1061|Lexicographically Smallest Equivalent String||66.7%|Medium|| |1062|Longest Repeating Substring||58.0%|Medium|| -|1063|Number of Valid Subarrays||72.1%|Hard|| +|1063|Number of Valid Subarrays||72.2%|Hard|| |1064|Fixed Point||65.4%|Easy|| |1065|Index Pairs of a String||60.9%|Easy|| |1066|Campus Bikes II||54.1%|Medium|| -|1067|Digit Count in Range||41.0%|Hard|| +|1067|Digit Count in Range||41.1%|Hard|| |1068|Product Sales Analysis I||82.3%|Easy|| |1069|Product Sales Analysis II||83.3%|Easy|| |1070|Product Sales Analysis III||49.8%|Medium|| @@ -1220,16 +1220,16 @@ |1080|Insufficient Nodes in Root to Leaf Paths||49.8%|Medium|| |1081|Smallest Subsequence of Distinct Characters||53.5%|Medium|| |1082|Sales Analysis I||73.4%|Easy|| -|1083|Sales Analysis II||50.7%|Easy|| +|1083|Sales Analysis II||50.8%|Easy|| |1084|Sales Analysis III||54.6%|Easy|| |1085|Sum of Digits in the Minimum Number||75.1%|Easy|| |1086|High Five||78.6%|Easy|| |1087|Brace Expansion||63.1%|Medium|| |1088|Confusing Number II||45.1%|Hard|| |1089|Duplicate Zeros|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1089.Duplicate-Zeros)|52.0%|Easy|| -|1090|Largest Values From Labels||60.1%|Medium|| +|1090|Largest Values From Labels||60.0%|Medium|| |1091|Shortest Path in Binary Matrix||39.0%|Medium|| -|1092|Shortest Common Supersequence ||52.8%|Hard|| +|1092|Shortest Common Supersequence ||52.9%|Hard|| |1093|Statistics from a Large Sample|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1093.Statistics-from-a-Large-Sample)|49.4%|Medium|| |1094|Car Pooling||59.1%|Medium|| |1095|Find in Mountain Array||36.0%|Hard|| @@ -1241,27 +1241,27 @@ |1101|The Earliest Moment When Everyone Become Friends||67.6%|Medium|| |1102|Path With Maximum Minimum Value||50.2%|Medium|| |1103|Distribute Candies to People||63.6%|Easy|| -|1104|Path In Zigzag Labelled Binary Tree||73.1%|Medium|| -|1105|Filling Bookcase Shelves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1105.Filling-Bookcase-Shelves)|57.7%|Medium|| +|1104|Path In Zigzag Labelled Binary Tree||73.0%|Medium|| +|1105|Filling Bookcase Shelves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1105.Filling-Bookcase-Shelves)|57.6%|Medium|| |1106|Parsing A Boolean Expression||59.1%|Hard|| |1107|New Users Daily Count||45.8%|Medium|| |1108|Defanging an IP Address|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1108.Defanging-an-IP-Address)|88.5%|Easy|| |1109|Corporate Flight Bookings||54.2%|Medium|| |1110|Delete Nodes And Return Forest|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1110.Delete-Nodes-And-Return-Forest)|67.6%|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.4%|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.5%|Medium|| |1112|Highest Grade For Each Student||71.8%|Medium|| -|1113|Reported Posts||65.4%|Easy|| +|1113|Reported Posts||65.5%|Easy|| |1114|Print in Order||67.0%|Easy|| -|1115|Print FooBar Alternately||59.0%|Medium|| +|1115|Print FooBar Alternately||59.1%|Medium|| |1116|Print Zero Even Odd||57.6%|Medium|| -|1117|Building H2O||53.2%|Medium|| -|1118|Number of Days in a Month||57.5%|Easy|| +|1117|Building H2O||53.1%|Medium|| +|1118|Number of Days in a Month||57.6%|Easy|| |1119|Remove Vowels from a String||90.5%|Easy|| |1120|Maximum Average Subtree||63.5%|Medium|| |1121|Divide Array Into Increasing Sequences||57.9%|Hard|| |1122|Relative Sort Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1122.Relative-Sort-Array)|67.8%|Easy|| |1123|Lowest Common Ancestor of Deepest Leaves|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1123.Lowest-Common-Ancestor-of-Deepest-Leaves)|67.9%|Medium|| -|1124|Longest Well-Performing Interval||33.2%|Medium|| +|1124|Longest Well-Performing Interval||33.3%|Medium|| |1125|Smallest Sufficient Team||46.9%|Hard|| |1126|Active Businesses||68.7%|Medium|| |1127|User Purchase Platform||50.3%|Hard|| @@ -1273,10 +1273,10 @@ |1133|Largest Unique Number||67.2%|Easy|| |1134|Armstrong Number||78.2%|Easy|| |1135|Connecting Cities With Minimum Cost||59.1%|Medium|| -|1136|Parallel Courses||61.3%|Hard|| +|1136|Parallel Courses||61.2%|Hard|| |1137|N-th Tribonacci Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1137.N-th-Tribonacci-Number)|56.1%|Easy|| |1138|Alphabet Board Path||50.7%|Medium|| -|1139|Largest 1-Bordered Square||48.4%|Medium|| +|1139|Largest 1-Bordered Square||48.5%|Medium|| |1140|Stone Game II||64.8%|Medium|| |1141|User Activity for the Past 30 Days I||54.4%|Easy|| |1142|User Activity for the Past 30 Days II||35.3%|Easy|| @@ -1286,7 +1286,7 @@ |1146|Snapshot Array||36.9%|Medium|| |1147|Longest Chunked Palindrome Decomposition||59.4%|Hard|| |1148|Article Views I||77.0%|Easy|| -|1149|Article Views II||48.4%|Medium|| +|1149|Article Views II||48.5%|Medium|| |1150|Check If a Number Is Majority Element in a Sorted Array||57.8%|Easy|| |1151|Minimum Swaps to Group All 1's Together||58.3%|Medium|| |1152|Analyze User Website Visit Pattern||43.3%|Medium|| @@ -1296,7 +1296,7 @@ |1156|Swap For Longest Repeated Character Substring||47.4%|Medium|| |1157|Online Majority Element In Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1157.Online-Majority-Element-In-Subarray)|39.6%|Hard|| |1158|Market Analysis I||63.6%|Medium|| -|1159|Market Analysis II||55.1%|Hard|| +|1159|Market Analysis II||55.0%|Hard|| |1160|Find Words That Can Be Formed by Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1160.Find-Words-That-Can-Be-Formed-by-Characters)|67.5%|Easy|| |1161|Maximum Level Sum of a Binary Tree||70.0%|Medium|| |1162|As Far from Land as Possible||45.0%|Medium|| @@ -1306,22 +1306,22 @@ |1166|Design File System||58.3%|Medium|| |1167|Minimum Cost to Connect Sticks||64.2%|Medium|| |1168|Optimize Water Distribution in a Village||61.7%|Hard|| -|1169|Invalid Transactions||31.5%|Medium|| +|1169|Invalid Transactions||31.4%|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)|59.5%|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.8%|Hard|| +|1172|Dinner Plate Stacks||37.9%|Hard|| |1173|Immediate Food Delivery I||82.3%|Easy|| -|1174|Immediate Food Delivery II||61.2%|Medium|| +|1174|Immediate Food Delivery II||61.3%|Medium|| |1175|Prime Arrangements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1175.Prime-Arrangements)|51.9%|Easy|| -|1176|Diet Plan Performance||54.0%|Easy|| +|1176|Diet Plan Performance||54.1%|Easy|| |1177|Can Make Palindrome from Substring||36.1%|Medium|| |1178|Number of Valid Words for Each Puzzle||38.6%|Hard|| |1179|Reformat Department Table||82.0%|Easy|| |1180|Count Substrings with Only One Distinct Letter||77.6%|Easy|| |1181|Before and After Puzzle||44.5%|Medium|| |1182|Shortest Distance to Target Color||53.4%|Medium|| -|1183|Maximum Number of Ones||56.9%|Hard|| -|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|54.2%|Easy|| +|1183|Maximum Number of Ones||57.0%|Hard|| +|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|54.1%|Easy|| |1185|Day of the Week|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1185.Day-of-the-Week)|61.9%|Easy|| |1186|Maximum Subarray Sum with One Deletion||38.5%|Medium|| |1187|Make Array Strictly Increasing||41.7%|Hard|| @@ -1333,14 +1333,14 @@ |1193|Monthly Transactions I||69.1%|Medium|| |1194|Tournament Winners||51.9%|Hard|| |1195|Fizz Buzz Multithreaded||70.5%|Medium|| -|1196|How Many Apples Can You Put into the Basket||68.2%|Easy|| +|1196|How Many Apples Can You Put into the Basket||68.1%|Easy|| |1197|Minimum Knight Moves||37.1%|Medium|| |1198|Find Smallest Common Element in All Rows||75.3%|Medium|| |1199|Minimum Time to Build Blocks||38.5%|Hard|| |1200|Minimum Absolute Difference|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1200.Minimum-Absolute-Difference)|66.8%|Easy|| |1201|Ugly Number III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1201.Ugly-Number-III)|26.4%|Medium|| |1202|Smallest String With Swaps|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1202.Smallest-String-With-Swaps)|48.5%|Medium|| -|1203|Sort Items by Groups Respecting Dependencies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1203.Sort-Items-by-Groups-Respecting-Dependencies)|49.0%|Hard|| +|1203|Sort Items by Groups Respecting Dependencies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1203.Sort-Items-by-Groups-Respecting-Dependencies)|49.1%|Hard|| |1204|Last Person to Fit in the Elevator||71.5%|Medium|| |1205|Monthly Transactions II||45.9%|Medium|| |1206|Design Skiplist||58.8%|Hard|| @@ -1355,10 +1355,10 @@ |1215|Stepping Numbers||43.2%|Medium|| |1216|Valid Palindrome III||49.5%|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)|71.2%|Easy|| -|1218|Longest Arithmetic Subsequence of Given Difference||46.4%|Medium|| +|1218|Longest Arithmetic Subsequence of Given Difference||46.5%|Medium|| |1219|Path with Maximum Gold||65.6%|Medium|| -|1220|Count Vowels Permutation||54.2%|Hard|| -|1221|Split a String in Balanced Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1221.Split-a-String-in-Balanced-Strings)|84.0%|Easy|| +|1220|Count Vowels Permutation||54.3%|Hard|| +|1221|Split a String in Balanced Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1221.Split-a-String-in-Balanced-Strings)|84.1%|Easy|| |1222|Queens That Can Attack the King||69.3%|Medium|| |1223|Dice Roll Simulation||46.6%|Hard|| |1224|Maximum Equal Frequency||34.5%|Hard|| @@ -1370,35 +1370,35 @@ |1230|Toss Strange Coins||49.7%|Medium|| |1231|Divide Chocolate||53.3%|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.8%|Easy|| -|1233|Remove Sub-Folders from the Filesystem||61.7%|Medium|| +|1233|Remove Sub-Folders from the Filesystem||61.8%|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.4%|Medium|| |1235|Maximum Profit in Job Scheduling|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1235.Maximum-Profit-in-Job-Scheduling)|46.9%|Hard|| |1236|Web Crawler||64.6%|Medium|| -|1237|Find Positive Integer Solution for a Given Equation||69.7%|Medium|| +|1237|Find Positive Integer Solution for a Given Equation||69.6%|Medium|| |1238|Circular Permutation in Binary Representation||65.9%|Medium|| -|1239|Maximum Length of a Concatenated String with Unique Characters||49.3%|Medium|| +|1239|Maximum Length of a Concatenated String with Unique Characters||49.4%|Medium|| |1240|Tiling a Rectangle with the Fewest Squares||52.3%|Hard|| |1241|Number of Comments per Post||67.6%|Easy|| |1242|Web Crawler Multithreaded||47.9%|Medium|| |1243|Array Transformation||50.3%|Easy|| |1244|Design A Leaderboard||65.9%|Medium|| |1245|Tree Diameter||61.2%|Medium|| -|1246|Palindrome Removal||45.7%|Hard|| +|1246|Palindrome Removal||45.8%|Hard|| |1247|Minimum Swaps to Make Strings Equal||62.3%|Medium|| |1248|Count Number of Nice Subarrays||56.3%|Medium|| |1249|Minimum Remove to Make Valid Parentheses||63.5%|Medium|| -|1250|Check If It Is a Good Array||56.4%|Hard|| +|1250|Check If It Is a Good Array||56.3%|Hard|| |1251|Average Selling Price||82.5%|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.7%|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.8%|Easy|| |1253|Reconstruct a 2-Row Binary Matrix||41.4%|Medium|| -|1254|Number of Closed Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1254.Number-of-Closed-Islands)|61.4%|Medium|| +|1254|Number of Closed Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1254.Number-of-Closed-Islands)|61.5%|Medium|| |1255|Maximum Score Words Formed by Letters||69.7%|Hard|| |1256|Encode Number||67.5%|Medium|| |1257|Smallest Common Region||60.4%|Medium|| -|1258|Synonymous Sentences||64.9%|Medium|| +|1258|Synonymous Sentences||64.8%|Medium|| |1259|Handshakes That Don't Cross||54.1%|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.4%|Medium|| +|1261|Find Elements in a Contaminated Binary Tree||74.5%|Medium|| |1262|Greatest Sum Divisible by Three||49.3%|Medium|| |1263|Minimum Moves to Move a Box to Their Target Location||42.9%|Hard|| |1264|Page Recommendations||69.2%|Medium|| @@ -1408,7 +1408,7 @@ |1268|Search Suggestions System||64.5%|Medium|| |1269|Number of Ways to Stay in the Same Place After Some Steps||43.3%|Hard|| |1270|All People Report to the Given Manager||88.4%|Medium|| -|1271|Hexspeak||55.4%|Easy|| +|1271|Hexspeak||55.3%|Easy|| |1272|Remove Interval||57.8%|Medium|| |1273|Delete Tree Nodes||62.4%|Medium|| |1274|Number of Ships in a Rectangle||66.3%|Hard|| @@ -1416,11 +1416,11 @@ |1276|Number of Burgers with No Waste of Ingredients||50.0%|Medium|| |1277|Count Square Submatrices with All Ones||72.9%|Medium|| |1278|Palindrome Partitioning III||60.6%|Hard|| -|1279|Traffic Light Controlled Intersection||75.7%|Easy|| +|1279|Traffic Light Controlled Intersection||75.6%|Easy|| |1280|Students and Examinations||74.3%|Easy|| |1281|Subtract the Product and Sum of Digits of an Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1281.Subtract-the-Product-and-Sum-of-Digits-of-an-Integer)|85.6%|Easy|| |1282|Group the People Given the Group Size They Belong To||84.3%|Medium|| -|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)|49.2%|Medium|| +|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)|49.3%|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.0%|Medium|| |1286|Iterator for Combination||70.9%|Medium|| @@ -1431,7 +1431,7 @@ |1291|Sequential Digits||57.4%|Medium|| |1292|Maximum Side Length of a Square with Sum Less than or Equal to Threshold||50.5%|Medium|| |1293|Shortest Path in a Grid with Obstacles Elimination||42.9%|Hard|| -|1294|Weather Type in Each Country||66.3%|Easy|| +|1294|Weather Type in Each Country||66.4%|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)|79.3%|Easy|| |1296|Divide Array in Sets of K Consecutive Numbers||55.3%|Medium|| |1297|Maximum Number of Occurrences of a Substring||49.3%|Medium|| @@ -1441,12 +1441,12 @@ |1301|Number of Paths with Max Score||38.0%|Hard|| |1302|Deepest Leaves Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1302.Deepest-Leaves-Sum)|84.1%|Medium|| |1303|Find the Team Size||89.4%|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|| +|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.8%|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.6%|Medium|| |1307|Verbal Arithmetic Puzzle||37.0%|Hard|| |1308|Running Total for Different Genders||87.2%|Medium|| -|1309|Decrypt String from Alphabet to Integer Mapping||77.2%|Easy|| +|1309|Decrypt String from Alphabet to Integer Mapping||77.3%|Easy|| |1310|XOR Queries of a Subarray||69.2%|Medium|| |1311|Get Watched Videos by Your Friends||44.1%|Medium|| |1312|Minimum Insertion Steps to Make a String Palindrome||59.3%|Hard|| @@ -1456,8 +1456,8 @@ |1316|Distinct Echo Substrings||49.7%|Hard|| |1317|Convert Integer to the Sum of Two No-Zero Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers)|56.8%|Easy|| |1318|Minimum Flips to Make a OR b Equal to c||63.8%|Medium|| -|1319|Number of Operations to Make Network Connected||54.8%|Medium|| -|1320|Minimum Distance to Type a Word Using Two Fingers||62.8%|Hard|| +|1319|Number of Operations to Make Network Connected|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1319.Number-of-Operations-to-Make-Network-Connected)|54.9%|Medium|| +|1320|Minimum Distance to Type a Word Using Two Fingers||62.9%|Hard|| |1321|Restaurant Growth||70.8%|Medium|| |1322|Ads Performance||57.8%|Easy|| |1323|Maximum 69 Number||78.0%|Easy|| @@ -1465,19 +1465,19 @@ |1325|Delete Leaves With a Given Value||73.6%|Medium|| |1326|Minimum Number of Taps to Open to Water a Garden||46.2%|Hard|| |1327|List the Products Ordered in a Period||77.4%|Easy|| -|1328|Break a Palindrome||45.7%|Medium|| -|1329|Sort the Matrix Diagonally||79.4%|Medium|| +|1328|Break a Palindrome||45.8%|Medium|| +|1329|Sort the Matrix Diagonally||79.6%|Medium|| |1330|Reverse Subarray To Maximize Array Value||36.6%|Hard|| -|1331|Rank Transform of an Array||57.6%|Easy|| +|1331|Rank Transform of an Array||57.7%|Easy|| |1332|Remove Palindromic Subsequences||62.8%|Easy|| |1333|Filter Restaurants by Vegan-Friendly, Price and Distance||57.0%|Medium|| |1334|Find the City With the Smallest Number of Neighbors at a Threshold Distance||46.6%|Medium|| |1335|Minimum Difficulty of a Job Schedule||57.2%|Hard|| |1336|Number of Transactions per Visit||47.5%|Hard|| |1337|The K Weakest Rows in a Matrix||69.8%|Easy|| -|1338|Reduce Array Size to The Half||66.7%|Medium|| -|1339|Maximum Product of Splitted Binary Tree||38.0%|Medium|| -|1340|Jump Game V||59.0%|Hard|| +|1338|Reduce Array Size to The Half||66.8%|Medium|| +|1339|Maximum Product of Splitted Binary Tree||38.1%|Medium|| +|1340|Jump Game V||59.1%|Hard|| |1341|Movie Rating||58.5%|Medium|| |1342|Number of Steps to Reduce a Number to Zero||85.7%|Easy|| |1343|Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold||64.6%|Medium|| @@ -1485,11 +1485,11 @@ |1345|Jump Game IV||41.9%|Hard|| |1346|Check If N and Its Double Exist||36.4%|Easy|| |1347|Minimum Number of Steps to Make Two Strings Anagram||75.3%|Medium|| -|1348|Tweet Counts Per Frequency||34.3%|Medium|| +|1348|Tweet Counts Per Frequency||34.4%|Medium|| |1349|Maximum Students Taking Exam||44.1%|Hard|| -|1350|Students With Invalid Departments||90.6%|Easy|| +|1350|Students With Invalid Departments||90.7%|Easy|| |1351|Count Negative Numbers in a Sorted Matrix||76.0%|Easy|| -|1352|Product of the Last K Numbers||43.9%|Medium|| +|1352|Product of the Last K Numbers||44.0%|Medium|| |1353|Maximum Number of Events That Can Be Attended||30.1%|Medium|| |1354|Construct Target Array With Multiple Sums||31.3%|Hard|| |1355|Activity Participants||74.2%|Medium|| @@ -1500,10 +1500,10 @@ |1360|Number of Days Between Two Dates||46.9%|Easy|| |1361|Validate Binary Tree Nodes||44.2%|Medium|| |1362|Closest Divisors||57.6%|Medium|| -|1363|Largest Multiple of Three||33.9%|Hard|| +|1363|Largest Multiple of Three||34.0%|Hard|| |1364|Number of Trusted Contacts of a Customer||78.1%|Medium|| |1365|How Many Numbers Are Smaller Than the Current Number||85.9%|Easy|| -|1366|Rank Teams by Votes||54.9%|Medium|| +|1366|Rank Teams by Votes||55.0%|Medium|| |1367|Linked List in Binary Tree||41.1%|Medium|| |1368|Minimum Cost to Make at Least One Valid Path in a Grid||56.9%|Hard|| |1369|Get the Second Most Recent Activity||68.5%|Hard|| @@ -1514,9 +1514,9 @@ |1374|Generate a String With Characters That Have Odd Counts||76.2%|Easy|| |1375|Bulb Switcher III||64.1%|Medium|| |1376|Time Needed to Inform All Employees||56.3%|Medium|| -|1377|Frog Position After T Seconds||34.8%|Hard|| -|1378|Replace Employee ID With The Unique Identifier||89.8%|Easy|| -|1379|Find a Corresponding Node of a Binary Tree in a Clone of That Tree||85.0%|Medium|| +|1377|Frog Position After T Seconds||34.9%|Hard|| +|1378|Replace Employee ID With The Unique Identifier||89.9%|Easy|| +|1379|Find a Corresponding Node of a Binary Tree in a Clone of That Tree||84.9%|Medium|| |1380|Lucky Numbers in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1380.Lucky-Numbers-in-a-Matrix)|70.8%|Easy|| |1381|Design a Stack With Increment Operation||75.8%|Medium|| |1382|Balance a Binary Search Tree||76.1%|Medium|| @@ -1525,22 +1525,22 @@ |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.4%|Easy|| |1386|Cinema Seat Allocation||35.5%|Medium|| |1387|Sort Integers by The Power Value||70.5%|Medium|| -|1388|Pizza With 3n Slices||45.4%|Hard|| +|1388|Pizza With 3n Slices||45.5%|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.8%|Easy|| |1390|Four Divisors||39.0%|Medium|| |1391|Check if There is a Valid Path in a Grid||45.0%|Medium|| |1392|Longest Happy Prefix||41.3%|Hard|| |1393|Capital Gain/Loss||90.5%|Medium|| |1394|Find Lucky Integer in an Array||63.2%|Easy|| -|1395|Count Number of Teams||80.5%|Medium|| +|1395|Count Number of Teams||80.4%|Medium|| |1396|Design Underground System||69.0%|Medium|| |1397|Find All Good Strings||38.2%|Hard|| |1398|Customers Who Bought Products A and B but Not C||82.0%|Medium|| |1399|Count Largest Group||65.4%|Easy|| |1400|Construct K Palindrome Strings||62.8%|Medium|| -|1401|Circle and Rectangle Overlapping||42.3%|Medium|| +|1401|Circle and Rectangle Overlapping||42.4%|Medium|| |1402|Reducing Dishes||72.3%|Hard|| -|1403|Minimum Subsequence in Non-Increasing Order||71.0%|Easy|| +|1403|Minimum Subsequence in Non-Increasing Order||71.1%|Easy|| |1404|Number of Steps to Reduce a Number in Binary Representation to One||49.9%|Medium|| |1405|Longest Happy String||52.2%|Medium|| |1406|Stone Game III||57.3%|Hard|| @@ -1551,18 +1551,18 @@ |1411|Number of Ways to Paint N × 3 Grid||60.4%|Hard|| |1412|Find the Quiet Students in All Exams||65.4%|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.7%|Medium|| -|1415|The k-th Lexicographical String of All Happy Strings of Length n||70.0%|Medium|| +|1414|Find the Minimum Number of Fibonacci Numbers Whose Sum Is K||63.3%|Medium|| +|1415|The k-th Lexicographical String of All Happy Strings of Length n||69.9%|Medium|| |1416|Restore The Array||36.3%|Hard|| |1417|Reformat The String||55.4%|Easy|| -|1418|Display Table of Food Orders in a Restaurant||68.3%|Medium|| +|1418|Display Table of Food Orders in a Restaurant||68.4%|Medium|| |1419|Minimum Number of Frogs Croaking||47.3%|Medium|| |1420|Build Array Where You Can Find The Maximum Exactly K Comparisons||64.3%|Hard|| |1421|NPV Queries||82.0%|Medium|| |1422|Maximum Score After Splitting a String||56.0%|Easy|| |1423|Maximum Points You Can Obtain from Cards||46.4%|Medium|| -|1424|Diagonal Traverse II||45.6%|Medium|| -|1425|Constrained Subsequence Sum||45.0%|Hard|| +|1424|Diagonal Traverse II||45.7%|Medium|| +|1425|Constrained Subsequence Sum||45.1%|Hard|| |1426|Counting Elements||59.0%|Easy|| |1427|Perform String Shifts||53.4%|Easy|| |1428|Leftmost Column with at Least a One||48.8%|Medium|| @@ -1570,9 +1570,9 @@ |1430|Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree||45.1%|Medium|| |1431|Kids With the Greatest Number of Candies||88.5%|Easy|| |1432|Max Difference You Can Get From Changing an Integer||42.8%|Medium|| -|1433|Check If a String Can Break Another String||67.0%|Medium|| +|1433|Check If a String Can Break Another String||66.9%|Medium|| |1434|Number of Ways to Wear Different Hats to Each Other||39.1%|Hard|| -|1435|Create a Session Bar Chart||77.8%|Easy|| +|1435|Create a Session Bar Chart||77.6%|Easy|| |1436|Destination City||77.0%|Easy|| |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||44.1%|Medium|| @@ -1587,7 +1587,7 @@ |1447|Simplified Fractions||62.2%|Medium|| |1448|Count Good Nodes in Binary Tree||70.3%|Medium|| |1449|Form Largest Integer With Digits That Add up to Target||43.8%|Hard|| -|1450|Number of Students Doing Homework at a Given Time||77.1%|Easy|| +|1450|Number of Students Doing Homework at a Given Time||77.2%|Easy|| |1451|Rearrange Words in a Sentence||59.2%|Medium|| |1452|People Whose List of Favorite Companies Is Not a Subset of Another List||54.9%|Medium|| |1453|Maximum Number of Darts Inside of a Circular Dartboard||35.2%|Hard|| @@ -1596,30 +1596,30 @@ |1456|Maximum Number of Vowels in a Substring of Given Length||54.4%|Medium|| |1457|Pseudo-Palindromic Paths in a Binary Tree||71.2%|Medium|| |1458|Max Dot Product of Two Subsequences||42.9%|Hard|| -|1459|Rectangles Area||64.3%|Medium|| +|1459|Rectangles Area||64.4%|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||47.0%|Medium|| |1462|Course Schedule IV||44.4%|Medium|| |1463|Cherry Pickup II||69.4%|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.0%|Easy|| +|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|| |1465|Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts||31.8%|Medium|| |1466|Reorder Routes to Make All Paths Lead to the City Zero||61.3%|Medium|| |1467|Probability of a Two Boxes Having The Same Number of Distinct Balls||61.0%|Hard|| -|1468|Calculate Salaries||81.3%|Medium|| +|1468|Calculate Salaries||81.4%|Medium|| |1469|Find All The Lonely Nodes||80.6%|Easy|| |1470|Shuffle the Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1470.Shuffle-the-Array)|88.5%|Easy|| |1471|The k Strongest Values in an Array||58.4%|Medium|| |1472|Design Browser History||70.4%|Medium|| |1473|Paint House III||48.7%|Hard|| -|1474|Delete N Nodes After M Nodes of a Linked List||74.5%|Easy|| -|1475|Final Prices With a Special Discount in a Shop||74.9%|Easy|| +|1474|Delete N Nodes After M Nodes of a Linked List||74.4%|Easy|| +|1475|Final Prices With a Special Discount in a Shop||75.0%|Easy|| |1476|Subrectangle Queries||88.6%|Medium|| |1477|Find Two Non-overlapping Sub-arrays Each With Target Sum||34.2%|Medium|| |1478|Allocate Mailboxes||54.1%|Hard|| -|1479|Sales by Day of the Week||83.7%|Hard|| +|1479|Sales by Day of the Week||83.6%|Hard|| |1480|Running Sum of 1d Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1480.Running-Sum-of-1d-Array)|89.5%|Easy|| |1481|Least Number of Unique Integers after K Removals||55.6%|Medium|| -|1482|Minimum Number of Days to Make m Bouquets||49.9%|Medium|| +|1482|Minimum Number of Days to Make m Bouquets||49.8%|Medium|| |1483|Kth Ancestor of a Tree Node||30.3%|Hard|| |1484|Group Sold Products By The Date||85.9%|Easy|| |1485|Clone Binary Tree With Random Pointer||79.5%|Medium|| @@ -1632,22 +1632,22 @@ |1492|The kth Factor of n||63.4%|Medium|| |1493|Longest Subarray of 1's After Deleting One Element||58.2%|Medium|| |1494|Parallel Courses II||31.5%|Hard|| -|1495|Friendly Movies Streamed Last Month||51.4%|Easy|| -|1496|Path Crossing||55.5%|Easy|| +|1495|Friendly Movies Streamed Last Month||51.3%|Easy|| +|1496|Path Crossing||55.4%|Easy|| |1497|Check If Array Pairs Are Divisible by k||40.5%|Medium|| |1498|Number of Subsequences That Satisfy the Given Sum Condition||38.3%|Medium|| |1499|Max Value of Equation||45.2%|Hard|| -|1500|Design a File Sharing System||46.1%|Medium|| -|1501|Countries You Can Safely Invest In||60.2%|Medium|| +|1500|Design a File Sharing System||46.0%|Medium|| +|1501|Countries You Can Safely Invest In||60.1%|Medium|| |1502|Can Make Arithmetic Progression From Sequence||70.8%|Easy|| -|1503|Last Moment Before All Ants Fall Out of a Plank||53.0%|Medium|| +|1503|Last Moment Before All Ants Fall Out of a Plank||53.1%|Medium|| |1504|Count Submatrices With All Ones||60.9%|Medium|| |1505|Minimum Possible Integer After at Most K Adjacent Swaps On Digits||36.1%|Hard|| |1506|Find Root of N-Ary Tree||80.5%|Medium|| |1507|Reformat Date||60.2%|Easy|| |1508|Range Sum of Sorted Subarray Sums||61.8%|Medium|| |1509|Minimum Difference Between Largest and Smallest Value in Three Moves||51.8%|Medium|| -|1510|Stone Game IV||58.7%|Hard|| +|1510|Stone Game IV||58.8%|Hard|| |1511|Customer Order Frequency||73.4%|Easy|| |1512|Number of Good Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1512.Number-of-Good-Pairs)|87.9%|Easy|| |1513|Number of Substrings With Only 1s||41.5%|Medium|| @@ -1659,35 +1659,35 @@ |1519|Number of Nodes in the Sub-Tree With the Same Label||36.9%|Medium|| |1520|Maximum Number of Non-Overlapping Substrings||36.0%|Hard|| |1521|Find a Value of a Mysterious Function Closest to Target||44.4%|Hard|| -|1522|Diameter of N-Ary Tree||68.8%|Medium|| -|1523|Count Odd Numbers in an Interval Range||54.8%|Easy|| +|1522|Diameter of N-Ary Tree||69.0%|Medium|| +|1523|Count Odd Numbers in an Interval Range||54.9%|Easy|| |1524|Number of Sub-arrays With Odd Sum||39.6%|Medium|| |1525|Number of Good Ways to Split a String||66.6%|Medium|| |1526|Minimum Number of Increments on Subarrays to Form a Target Array||59.8%|Hard|| -|1527|Patients With a Condition||73.8%|Easy|| -|1528|Shuffle String||85.7%|Easy|| +|1527|Patients With a Condition||73.5%|Easy|| +|1528|Shuffle String||85.8%|Easy|| |1529|Bulb Switcher IV||70.9%|Medium|| |1530|Number of Good Leaf Nodes Pairs||55.9%|Medium|| |1531|String Compression II||33.4%|Hard|| |1532|The Most Recent Three Orders||73.0%|Medium|| |1533|Find the Index of the Large Integer||54.8%|Medium|| -|1534|Count Good Triplets||80.2%|Easy|| +|1534|Count Good Triplets||80.3%|Easy|| |1535|Find the Winner of an Array Game||47.2%|Medium|| |1536|Minimum Swaps to Arrange a Binary Grid||43.2%|Medium|| |1537|Get the Maximum Score||36.4%|Hard|| -|1538|Guess the Majority in a Hidden Array||61.6%|Medium|| +|1538|Guess the Majority in a Hidden Array||61.7%|Medium|| |1539|Kth Missing Positive Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1539.Kth-Missing-Positive-Number)|55.2%|Easy|| |1540|Can Convert String in K Moves||30.6%|Medium|| -|1541|Minimum Insertions to Balance a Parentheses String||42.6%|Medium|| +|1541|Minimum Insertions to Balance a Parentheses String||42.5%|Medium|| |1542|Find Longest Awesome Substring||36.4%|Hard|| -|1543|Fix Product Name Format||68.1%|Easy|| -|1544|Make The String Great||55.1%|Easy|| -|1545|Find Kth Bit in Nth Binary String||57.3%|Medium|| +|1543|Fix Product Name Format||68.0%|Easy|| +|1544|Make The String Great||55.2%|Easy|| +|1545|Find Kth Bit in Nth Binary String||57.4%|Medium|| |1546|Maximum Number of Non-Overlapping Subarrays With Sum Equals Target||43.8%|Medium|| |1547|Minimum Cost to Cut a Stick||52.2%|Hard|| |1548|The Most Similar Path in a Graph||54.1%|Hard|| |1549|The Most Recent Orders for Each Product||66.3%|Medium|| -|1550|Three Consecutive Odds||65.2%|Easy|| +|1550|Three Consecutive Odds||65.1%|Easy|| |1551|Minimum Operations to Make Array Equal||77.8%|Medium|| |1552|Magnetic Force Between Two Balls||48.7%|Medium|| |1553|Minimum Number of Days to Eat N Oranges||29.3%|Hard|| @@ -1701,7 +1701,7 @@ |1561|Maximum Number of Coins You Can Get||78.0%|Medium|| |1562|Find Latest Group of Size M||39.4%|Medium|| |1563|Stone Game V||40.1%|Hard|| -|1564|Put Boxes Into the Warehouse I||65.8%|Medium|| +|1564|Put Boxes Into the Warehouse I||65.7%|Medium|| |1565|Unique Orders and Customers Per Month||83.3%|Easy|| |1566|Detect Pattern of Length M Repeated K or More Times||42.4%|Easy|| |1567|Maximum Length of Subarray With Positive Product||36.5%|Medium|| @@ -1709,7 +1709,7 @@ |1569|Number of Ways to Reorder Array to Get Same BST||50.0%|Hard|| |1570|Dot Product of Two Sparse Vectors||91.4%|Medium|| |1571|Warehouse Manager||90.1%|Easy|| -|1572|Matrix Diagonal Sum||78.3%|Easy|| +|1572|Matrix Diagonal Sum||78.2%|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)|30.9%|Medium|| |1574|Shortest Subarray to be Removed to Make Array Sorted||33.0%|Medium|| |1575|Count All Possible Routes||57.4%|Hard|| @@ -1717,30 +1717,30 @@ |1577|Number of Ways Where Square of Number Is Equal to Product of Two Numbers||37.3%|Medium|| |1578|Minimum Deletion Cost to Avoid Repeating Letters||60.4%|Medium|| |1579|Remove Max Number of Edges to Keep Graph Fully Traversable||45.8%|Hard|| -|1580|Put Boxes Into the Warehouse II||62.0%|Medium|| +|1580|Put Boxes Into the Warehouse II||62.1%|Medium|| |1581|Customer Who Visited but Did Not Make Any Transactions||90.3%|Easy|| -|1582|Special Positions in a Binary Matrix||64.4%|Easy|| +|1582|Special Positions in a Binary Matrix||64.3%|Easy|| |1583|Count Unhappy Friends||54.0%|Medium|| |1584|Min Cost to Connect All Points||50.8%|Medium|| |1585|Check If String Is Transformable With Substring Sort Operations||48.2%|Hard|| -|1586|Binary Search Tree Iterator II||66.5%|Medium|| +|1586|Binary Search Tree Iterator II||66.7%|Medium|| |1587|Bank Account Summary II||90.3%|Easy|| -|1588|Sum of All Odd Length Subarrays||82.1%|Easy|| +|1588|Sum of All Odd Length Subarrays||82.2%|Easy|| |1589|Maximum Sum Obtained of Any Permutation||34.8%|Medium|| -|1590|Make Sum Divisible by P||27.2%|Medium|| +|1590|Make Sum Divisible by P||27.1%|Medium|| |1591|Strange Printer II||55.4%|Hard|| |1592|Rearrange Spaces Between Words||43.8%|Easy|| |1593|Split a String Into the Max Number of Unique Substrings||48.4%|Medium|| |1594|Maximum Non Negative Product in a Matrix||31.9%|Medium|| -|1595|Minimum Cost to Connect Two Groups of Points||42.8%|Hard|| +|1595|Minimum Cost to Connect Two Groups of Points||42.7%|Hard|| |1596|The Most Frequently Ordered Products for Each Customer||84.5%|Medium|| -|1597|Build Binary Expression Tree From Infix Expression||66.1%|Hard|| -|1598|Crawler Log Folder||64.2%|Easy|| +|1597|Build Binary Expression Tree From Infix Expression||65.8%|Hard|| +|1598|Crawler Log Folder||64.1%|Easy|| |1599|Maximum Profit of Operating a Centennial Wheel||43.5%|Medium|| -|1600|Throne Inheritance||59.8%|Medium|| -|1601|Maximum Number of Achievable Transfer Requests||47.5%|Hard|| +|1600|Throne Inheritance||59.9%|Medium|| +|1601|Maximum Number of Achievable Transfer Requests||47.6%|Hard|| |1602|Find Nearest Right Node in Binary Tree||74.0%|Medium|| -|1603|Design Parking System||86.7%|Easy|| +|1603|Design Parking System||86.6%|Easy|| |1604|Alert Using Same Key-Card Three or More Times in a One Hour Period||42.2%|Medium|| |1605|Find Valid Matrix Given Row and Column Sums||77.9%|Medium|| |1606|Find Servers That Handled Most Number of Requests||36.9%|Hard|| @@ -1749,125 +1749,126 @@ |1609|Even Odd Tree||53.2%|Medium|| |1610|Maximum Number of Visible Points||28.7%|Hard|| |1611|Minimum One Bit Operations to Make Integers Zero||57.1%|Hard|| -|1612|Check If Two Expression Trees are Equivalent||69.8%|Medium|| -|1613|Find the Missing IDs||72.5%|Medium|| -|1614|Maximum Nesting Depth of the Parentheses||83.4%|Easy|| -|1615|Maximal Network Rank||51.7%|Medium|| +|1612|Check If Two Expression Trees are Equivalent||69.9%|Medium|| +|1613|Find the Missing IDs||72.6%|Medium|| +|1614|Maximum Nesting Depth of the Parentheses||83.3%|Easy|| +|1615|Maximal Network Rank||51.8%|Medium|| |1616|Split Two Strings to Make Palindrome||36.4%|Medium|| |1617|Count Subtrees With Max Distance Between Cities||63.4%|Hard|| -|1618|Maximum Font to Fit a Sentence in a Screen||57.7%|Medium|| -|1619|Mean of Array After Removing Some Elements||65.5%|Easy|| +|1618|Maximum Font to Fit a Sentence in a Screen||57.5%|Medium|| +|1619|Mean of Array After Removing Some Elements||65.4%|Easy|| |1620|Coordinate With Maximum Network Quality||37.0%|Medium|| |1621|Number of Sets of K Non-Overlapping Line Segments||41.2%|Medium|| |1622|Fancy Sequence||15.6%|Hard|| |1623|All Valid Triplets That Can Represent a Country||89.0%|Easy|| |1624|Largest Substring Between Two Equal Characters||59.1%|Easy|| -|1625|Lexicographically Smallest String After Applying Operations||63.6%|Medium|| +|1625|Lexicographically Smallest String After Applying Operations||63.7%|Medium|| |1626|Best Team With No Conflicts||37.4%|Medium|| -|1627|Graph Connectivity With Threshold||38.1%|Hard|| +|1627|Graph Connectivity With Threshold||38.2%|Hard|| |1628|Design an Expression Tree With Evaluate Function||79.9%|Medium|| -|1629|Slowest Key||59.0%|Easy|| -|1630|Arithmetic Subarrays||77.6%|Medium|| -|1631|Path With Minimum Effort||43.5%|Medium|| +|1629|Slowest Key||58.9%|Easy|| +|1630|Arithmetic Subarrays||77.5%|Medium|| +|1631|Path With Minimum Effort||43.6%|Medium|| |1632|Rank Transform of a Matrix||30.5%|Hard|| -|1633|Percentage of Users Attended a Contest||73.6%|Easy|| -|1634|Add Two Polynomials Represented as Linked Lists||55.8%|Medium|| -|1635|Hopper Company Queries I||55.8%|Hard|| +|1633|Percentage of Users Attended a Contest||73.5%|Easy|| +|1634|Add Two Polynomials Represented as Linked Lists||55.7%|Medium|| +|1635|Hopper Company Queries I||55.9%|Hard|| |1636|Sort Array by Increasing Frequency||66.9%|Easy|| |1637|Widest Vertical Area Between Two Points Containing No Points||83.6%|Medium|| |1638|Count Substrings That Differ by One Character||68.3%|Medium|| -|1639|Number of Ways to Form a Target String Given a Dictionary||39.4%|Hard|| -|1640|Check Array Formation Through Concatenation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1640.Check-Array-Formation-Through-Concatenation)|61.2%|Easy|| -|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|77.4%|Medium|| -|1642|Furthest Building You Can Reach||51.1%|Medium|| -|1643|Kth Smallest Instructions||43.0%|Hard|| +|1639|Number of Ways to Form a Target String Given a Dictionary||39.5%|Hard|| +|1640|Check Array Formation Through Concatenation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1640.Check-Array-Formation-Through-Concatenation)|60.9%|Easy|| +|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|77.3%|Medium|| +|1642|Furthest Building You Can Reach||51.0%|Medium|| +|1643|Kth Smallest Instructions||43.1%|Hard|| |1644|Lowest Common Ancestor of a Binary Tree II||57.4%|Medium|| -|1645|Hopper Company Queries II||41.2%|Hard|| +|1645|Hopper Company Queries II||41.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.5%|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)|53.8%|Medium|| |1648|Sell Diminishing-Valued Colored Balls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1648.Sell-Diminishing-Valued-Colored-Balls)|30.9%|Medium|| |1649|Create Sorted Array through Instructions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1649.Create-Sorted-Array-through-Instructions)|36.1%|Hard|| -|1650|Lowest Common Ancestor of a Binary Tree III||77.2%|Medium|| +|1650|Lowest Common Ancestor of a Binary Tree III||77.1%|Medium|| |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)|63.9%|Easy|| +|1652|Defuse the Bomb|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1652.Defuse-the-Bomb)|63.8%|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)|50.1%|Medium|| |1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|26.2%|Medium|| |1655|Distribute Repeating Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1655.Distribute-Repeating-Integers)|40.5%|Hard|| -|1656|Design an Ordered Stream|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1656.Design-an-Ordered-Stream)|82.3%|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)|51.4%|Medium|| +|1656|Design an Ordered Stream|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1656.Design-an-Ordered-Stream)|82.1%|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)|56.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.2%|Hard|| |1660|Correct a Binary Tree||79.1%|Medium|| -|1661|Average Time of Process per Machine||79.5%|Easy|| +|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)|83.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)|60.0%|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)|60.7%|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)|67.8%|Hard|| -|1666|Change the Root of a Binary Tree||68.3%|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)|67.7%|Hard|| +|1666|Change the Root of a Binary Tree||68.4%|Medium|| |1667|Fix Names in a Table||64.0%|Easy|| -|1668|Maximum Repeating Substring|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1668.Maximum-Repeating-Substring)|38.7%|Easy|| -|1669|Merge In Between Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1669.Merge-In-Between-Linked-Lists)|78.1%|Medium|| -|1670|Design Front Middle Back Queue|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1670.Design-Front-Middle-Back-Queue)|54.7%|Medium|| +|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)|78.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.6%|Medium|| |1671|Minimum Number of Removals to Make Mountain Array||45.8%|Hard|| |1672|Richest Customer Wealth|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1672.Richest-Customer-Wealth)|88.4%|Easy|| -|1673|Find the Most Competitive Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1673.Find-the-Most-Competitive-Subsequence)|44.4%|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.5%|Medium|| -|1675|Minimize Deviation in Array||44.8%|Hard|| +|1673|Find the Most Competitive Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1673.Find-the-Most-Competitive-Subsequence)|45.1%|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.6%|Medium|| +|1675|Minimize Deviation in Array||44.6%|Hard|| |1676|Lowest Common Ancestor of a Binary Tree IV||78.1%|Medium|| -|1677|Product's Worth Over Invoices||74.7%|Easy|| +|1677|Product's Worth Over Invoices||74.8%|Easy|| |1678|Goal Parser Interpretation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1678.Goal-Parser-Interpretation)|86.4%|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)|54.4%|Medium|| -|1680|Concatenation of Consecutive Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1680.Concatenation-of-Consecutive-Binary-Numbers)|45.2%|Medium|| +|1680|Concatenation of Consecutive Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1680.Concatenation-of-Consecutive-Binary-Numbers)|45.1%|Medium|| |1681|Minimum Incompatibility|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1681.Minimum-Incompatibility)|35.1%|Hard|| -|1682|Longest Palindromic Subsequence II||51.6%|Medium|| -|1683|Invalid Tweets||91.2%|Easy|| +|1682|Longest Palindromic Subsequence II||51.4%|Medium|| +|1683|Invalid Tweets||91.1%|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)|84.0%|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)|61.7%|Medium|| |1686|Stone Game VI||49.0%|Medium|| -|1687|Delivering Boxes from Storage to Ports||34.8%|Hard|| +|1687|Delivering Boxes from Storage to Ports||34.7%|Hard|| |1688|Count of Matches in Tournament|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1688.Count-of-Matches-in-Tournament)|83.0%|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.9%|Medium|| +|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.8%|Medium|| |1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|46.9%|Medium|| -|1691|Maximum Height by Stacking Cuboids ||49.8%|Hard|| +|1691|Maximum Height by Stacking Cuboids ||49.9%|Hard|| |1692|Count Ways to Distribute Candies||61.7%|Hard|| -|1693|Daily Leads and Partners||91.2%|Easy|| -|1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|67.0%|Easy|| +|1693|Daily Leads and Partners||91.0%|Easy|| +|1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|66.9%|Easy|| |1695|Maximum Erasure Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1695.Maximum-Erasure-Value)|49.6%|Medium|| -|1696|Jump Game VI|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1696.Jump-Game-VI)|54.9%|Medium|| +|1696|Jump Game VI|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1696.Jump-Game-VI)|54.8%|Medium|| |1697|Checking Existence of Edge Length Limited Paths||56.4%|Hard|| |1698|Number of Distinct Substrings in a String||56.2%|Medium|| -|1699|Number of Calls Between Two Persons||86.0%|Medium|| -|1700|Number of Students Unable to Eat Lunch||69.8%|Easy|| -|1701|Average Waiting Time||61.4%|Medium|| -|1702|Maximum Binary String After Change||61.4%|Medium|| +|1699|Number of Calls Between Two Persons||86.2%|Medium|| +|1700|Number of Students Unable to Eat Lunch||69.9%|Easy|| +|1701|Average Waiting Time||61.5%|Medium|| +|1702|Maximum Binary String After Change||61.2%|Medium|| |1703|Minimum Adjacent Swaps for K Consecutive Ones||40.7%|Hard|| |1704|Determine if String Halves Are Alike||78.2%|Easy|| |1705|Maximum Number of Eaten Apples||42.2%|Medium|| -|1706|Where Will the Ball Fall||58.5%|Medium|| +|1706|Where Will the Ball Fall||58.6%|Medium|| |1707|Maximum XOR With an Element From Array||47.8%|Hard|| -|1708|Largest Subarray Length K||64.5%|Easy|| -|1709|Biggest Window Between Visits||82.2%|Medium|| -|1710|Maximum Units on a Truck||71.2%|Easy|| -|1711|Count Good Meals||25.8%|Medium|| +|1708|Largest Subarray Length K||64.3%|Easy|| +|1709|Biggest Window Between Visits||82.5%|Medium|| +|1710|Maximum Units on a Truck||70.9%|Easy|| +|1711|Count Good Meals||25.7%|Medium|| |1712|Ways to Split Array Into Three Subarrays||29.9%|Medium|| |1713|Minimum Operations to Make a Subsequence||45.4%|Hard|| -|1714|Sum Of Special Evenly-Spaced Elements In Array||47.4%|Hard|| +|1714|Sum Of Special Evenly-Spaced Elements In Array||47.8%|Hard|| |1715|Count Apples and Oranges||78.1%|Medium|| -|1716|Calculate Money in Leetcode Bank||68.8%|Easy|| -|1717|Maximum Score From Removing Substrings||38.7%|Medium|| -|1718|Construct the Lexicographically Largest Valid Sequence||43.8%|Medium|| -|1719|Number Of Ways To Reconstruct A Tree||39.5%|Hard|| -|1720|Decode XORed Array||86.1%|Easy|| -|1721|Swapping Nodes in a Linked List||65.5%|Medium|| -|1722|Minimize Hamming Distance After Swap Operations||55.9%|Medium|| -|1723|Find Minimum Time to Finish All Jobs||44.6%|Hard|| -|1724|Checking Existence of Edge Length Limited Paths II||58.2%|Hard|| -|1725|Number Of Rectangles That Can Form The Largest Square||77.4%|Easy|| +|1716|Calculate Money in Leetcode Bank||68.7%|Easy|| +|1717|Maximum Score From Removing Substrings||39.0%|Medium|| +|1718|Construct the Lexicographically Largest Valid Sequence||43.9%|Medium|| +|1719|Number Of Ways To Reconstruct A Tree||39.3%|Hard|| +|1720|Decode XORed Array||86.0%|Easy|| +|1721|Swapping Nodes in a Linked List||65.1%|Medium|| +|1722|Minimize Hamming Distance After Swap Operations||55.8%|Medium|| +|1723|Find Minimum Time to Finish All Jobs||44.7%|Hard|| +|1724|Checking Existence of Edge Length Limited Paths II||58.0%|Hard|| +|1725|Number Of Rectangles That Can Form The Largest Square||77.3%|Easy|| |1726|Tuple with Same Product||53.6%|Medium|| -|1727|Largest Submatrix With Rearrangements||57.3%|Medium|| -|1728|Cat and Mouse II||40.3%|Hard|| +|1727|Largest Submatrix With Rearrangements||57.5%|Medium|| +|1728|Cat and Mouse II||40.4%|Hard|| |1729|Find Followers Count||72.4%|Easy|| -|1730|Shortest Path to Get Food||65.6%|Medium|| +|1730|Shortest Path to Get Food||64.5%|Medium|| +|1731|The Number of Employees Which Report to Each Employee||51.2%|Easy|| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------| ------------------------------------------------------------------ diff --git a/leetcode/0042.Trapping-Rain-Water/README.md b/leetcode/0042.Trapping-Rain-Water/README.md index 4b8fbf87..9bafaa2d 100644 --- a/leetcode/0042.Trapping-Rain-Water/README.md +++ b/leetcode/0042.Trapping-Rain-Water/README.md @@ -10,9 +10,9 @@ Given n non-negative integers representing an elevation map where the width of e The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image! -Example: +**Example**: -```c +```go Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 ``` @@ -23,7 +23,9 @@ Output: 6 ## 解题思路 - -![](https://image.ibb.co/d6A2ZU/IMG-0139.jpg) - -每个数组里面的元素值可以想象成一个左右都有壁的圆柱筒。例如上图中左边的第二个元素 1,当前左边最大的元素是 2 ,所以 2 高度的水会装到 1 的上面(因为想象成了左右都有筒壁)。这道题的思路就是左指针从 0 开始往右扫,右指针从最右边开始往左扫。额外还需要 2 个变量分别记住左边最大的高度和右边最大高度。遍历扫数组元素的过程中,如果左指针的高度比右指针的高度小,就不断的移动左指针,否则移动右指针。循环的终止条件就是左右指针碰上以后就结束。只要数组中元素的高度比保存的局部最大高度小,就累加 res 的值,否则更新局部最大高度。最终解就是 res 的值。 \ No newline at end of file +- 每个数组里面的元素值可以想象成一个左右都有壁的圆柱筒。例如下图中左边的第二个元素 1,当前左边最大的元素是 2 ,所以 2 高度的水会装到 1 的上面(因为想象成了左右都有筒壁)。这道题的思路就是左指针从 0 开始往右扫,右指针从最右边开始往左扫。额外还需要 2 个变量分别记住左边最大的高度和右边最大高度。遍历扫数组元素的过程中,如果左指针的高度比右指针的高度小,就不断的移动左指针,否则移动右指针。循环的终止条件就是左右指针碰上以后就结束。只要数组中元素的高度比保存的局部最大高度小,就累加 res 的值,否则更新局部最大高度。最终解就是 res 的值。 + ![](https://image.ibb.co/d6A2ZU/IMG-0139.jpg) +- 抽象一下,本题是想求针对每个 i,找到它左边最大值 leftMax,右边的最大值 rightMax,然后 min(leftMax,rightMax) 为能够接到水的高度。left 和 right 指针是两边往中间移动的游标指针。最傻的解题思路是针对每个下标 i,往左循环找到第一个最大值,往右循环找到第一个最大值,然后把这两个最大值取出最小者,即为当前雨水的高度。这样做时间复杂度高,浪费了很多循环。i 在从左往右的过程中,是可以动态维护最大值的。右边的最大值用右边的游标指针来维护。从左往右扫一遍下标,和,从两边往中间遍历一遍下标,是相同的结果,每个下标都遍历了一次。 + ![](https://img.halfrost.com/Leetcode/leetcode_42_1.png) +- 每个 i 的宽度固定为 1,所以每个“坑”只需要求出高度,即当前这个“坑”能积攒的雨水。最后依次将每个“坑”中的雨水相加即是能接到的雨水数。 + ![](https://img.halfrost.com/Leetcode/leetcode_42_0.png) \ No newline at end of file diff --git a/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected.go b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected.go new file mode 100644 index 00000000..0180e380 --- /dev/null +++ b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected.go @@ -0,0 +1,24 @@ +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/template" +) + +func makeConnected(n int, connections [][]int) int { + if n-1 > len(connections) { + return -1 + } + uf, redundance := template.UnionFind{}, 0 + uf.Init(n) + for _, connection := range connections { + if uf.Find(connection[0]) == uf.Find(connection[1]) { + redundance++ + } else { + uf.Union(connection[0], connection[1]) + } + } + if uf.TotalCount() == 1 || redundance < uf.TotalCount()-1 { + return 0 + } + return uf.TotalCount() - 1 +} diff --git a/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected_test.go b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected_test.go new file mode 100644 index 00000000..1cdd6b43 --- /dev/null +++ b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/1319. Number of Operations to Make Network Connected_test.go @@ -0,0 +1,63 @@ +package leetcode + +import ( + "fmt" + "testing" +) + +type question1319 struct { + para1319 + ans1319 +} + +// para 是参数 +// one 代表第一个参数 +type para1319 struct { + n int + connections [][]int +} + +// ans 是答案 +// one 代表第一个答案 +type ans1319 struct { + one int +} + +func Test_Problem1319(t *testing.T) { + + qs := []question1319{ + + { + para1319{4, [][]int{{0, 1}, {0, 2}, {1, 2}}}, + ans1319{1}, + }, + + { + para1319{6, [][]int{{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}}}, + ans1319{2}, + }, + + { + para1319{6, [][]int{{0, 1}, {0, 2}, {0, 3}, {1, 2}}}, + ans1319{-1}, + }, + + { + para1319{5, [][]int{{0, 1}, {0, 2}, {3, 4}, {2, 3}}}, + ans1319{0}, + }, + + { + para1319{12, [][]int{{1, 5}, {1, 7}, {1, 2}, {1, 4}, {3, 7}, {4, 7}, {3, 5}, {0, 6}, {0, 1}, {0, 4}, {2, 6}, {0, 3}, {0, 2}}}, + ans1319{4}, + }, + } + + fmt.Printf("------------------------Leetcode Problem 1319------------------------\n") + + for _, q := range qs { + _, p := q.ans1319, q.para1319 + fmt.Printf("【input】:%v 【output】:%v\n", p, makeConnected(p.n, p.connections)) + } + fmt.Printf("\n\n\n") +} diff --git a/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/README.md b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/README.md new file mode 100644 index 00000000..15232def --- /dev/null +++ b/leetcode/1319.Number-of-Operations-to-Make-Network-Connected/README.md @@ -0,0 +1,90 @@ +# [1319. Number of Operations to Make Network Connected](https://leetcode.com/problems/number-of-operations-to-make-network-connected/) + + +## 题目 + +There are `n` computers numbered from `0` to `n-1` connected by ethernet cables `connections` forming a network where `connections[i] = [a, b]` represents a connection between computers `a` and `b`. Any computer can reach any other computer directly or indirectly through the network. + +Given an initial computer network `connections`. You can extract certain cables between two directly connected computers, and place them between any pair of disconnected computers to make them directly connected. Return the *minimum number of times* you need to do this in order to make all the computers connected. If it's not possible, return -1. + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/01/02/sample_1_1677.png](https://assets.leetcode.com/uploads/2020/01/02/sample_1_1677.png) + +``` +Input: n = 4, connections = [[0,1],[0,2],[1,2]] +Output: 1 +Explanation: Remove cable between computer 1 and 2 and place between computers 1 and 3. +``` + +**Example 2:** + +![https://assets.leetcode.com/uploads/2020/01/02/sample_2_1677.png](https://assets.leetcode.com/uploads/2020/01/02/sample_2_1677.png) + +``` +Input: n = 6, connections = [[0,1],[0,2],[0,3],[1,2],[1,3]] +Output: 2 +``` + +**Example 3:** + +``` +Input: n = 6, connections = [[0,1],[0,2],[0,3],[1,2]] +Output: -1 +Explanation: There are not enough cables. +``` + +**Example 4:** + +``` +Input: n = 5, connections = [[0,1],[0,2],[3,4],[2,3]] +Output: 0 +``` + +**Constraints:** + +- `1 <= n <= 10^5` +- `1 <= connections.length <= min(n*(n-1)/2, 10^5)` +- `connections[i].length == 2` +- `0 <= connections[i][0], connections[i][1] < n` +- `connections[i][0] != connections[i][1]` +- There are no repeated connections. +- No two computers are connected by more than one cable. + +## 题目大意 + +用以太网线缆将 n 台计算机连接成一个网络,计算机的编号从 0 到 n-1。线缆用 connections 表示,其中 connections[i] = [a, b] 连接了计算机 a 和 b。网络中的任何一台计算机都可以通过网络直接或者间接访问同一个网络中其他任意一台计算机。给你这个计算机网络的初始布线 connections,你可以拔开任意两台直连计算机之间的线缆,并用它连接一对未直连的计算机。请你计算并返回使所有计算机都连通所需的最少操作次数。如果不可能,则返回 -1 。 + +## 解题思路 + +- 很明显这题的解题思路是并查集。先将每个 connections 构建出并查集。构建中需要累加冗余的连接。例如 2 个节点已经连通,再连接这个集合中的任意 2 个节点就算冗余连接。冗余连接的线都可以移动,去连接还没有连通的节点。计算出冗余连接数,再根据并查集的集合总数,即可得出答案。 +- 这一题答案有 3 种可能。第一种,所有点都在一个集合内,即全部连通,这时输出 0 。第二种,冗余的连接不够串起所有点,这时输出 -1 。第三种情况是可以连通的情况。 m 个集合需要连通,最少需要 m - 1 条线。如果冗余连接数大于 m - 1,则输出 m - 1 即可。 + +## 代码 + +```go +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/template" +) + +func makeConnected(n int, connections [][]int) int { + if n-1 > len(connections) { + return -1 + } + uf, redundance := template.UnionFind{}, 0 + uf.Init(n) + for _, connection := range connections { + if uf.Find(connection[0]) == uf.Find(connection[1]) { + redundance++ + } else { + uf.Union(connection[0], connection[1]) + } + } + if uf.TotalCount() == 1 || redundance < uf.TotalCount()-1 { + return 0 + } + return uf.TotalCount() - 1 +} +``` \ No newline at end of file diff --git a/website/content/ChapterFour/0042.Trapping-Rain-Water.md b/website/content/ChapterFour/0042.Trapping-Rain-Water.md index 9af370ab..a16a2890 100644 --- a/website/content/ChapterFour/0042.Trapping-Rain-Water.md +++ b/website/content/ChapterFour/0042.Trapping-Rain-Water.md @@ -12,11 +12,9 @@ The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In th **Example**: -``` - +```go Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 - ``` ## 题目大意 @@ -25,15 +23,16 @@ Output: 6 ## 解题思路 - -![](https://image.ibb.co/d6A2ZU/IMG-0139.jpg) - -每个数组里面的元素值可以想象成一个左右都有壁的圆柱筒。例如上图中左边的第二个元素 1,当前左边最大的元素是 2 ,所以 2 高度的水会装到 1 的上面(因为想象成了左右都有筒壁)。这道题的思路就是左指针从 0 开始往右扫,右指针从最右边开始往左扫。额外还需要 2 个变量分别记住左边最大的高度和右边最大高度。遍历扫数组元素的过程中,如果左指针的高度比右指针的高度小,就不断的移动左指针,否则移动右指针。循环的终止条件就是左右指针碰上以后就结束。只要数组中元素的高度比保存的局部最大高度小,就累加 res 的值,否则更新局部最大高度。最终解就是 res 的值。 +- 每个数组里面的元素值可以想象成一个左右都有壁的圆柱筒。例如下图中左边的第二个元素 1,当前左边最大的元素是 2 ,所以 2 高度的水会装到 1 的上面(因为想象成了左右都有筒壁)。这道题的思路就是左指针从 0 开始往右扫,右指针从最右边开始往左扫。额外还需要 2 个变量分别记住左边最大的高度和右边最大高度。遍历扫数组元素的过程中,如果左指针的高度比右指针的高度小,就不断的移动左指针,否则移动右指针。循环的终止条件就是左右指针碰上以后就结束。只要数组中元素的高度比保存的局部最大高度小,就累加 res 的值,否则更新局部最大高度。最终解就是 res 的值。 + ![](https://image.ibb.co/d6A2ZU/IMG-0139.jpg) +- 抽象一下,本题是想求针对每个 i,找到它左边最大值 leftMax,右边的最大值 rightMax,然后 min(leftMax,rightMax) 为能够接到水的高度。left 和 right 指针是两边往中间移动的游标指针。最傻的解题思路是针对每个下标 i,往左循环找到第一个最大值,往右循环找到第一个最大值,然后把这两个最大值取出最小者,即为当前雨水的高度。这样做时间复杂度高,浪费了很多循环。i 在从左往右的过程中,是可以动态维护最大值的。右边的最大值用右边的游标指针来维护。从左往右扫一遍下标,和,从两边往中间遍历一遍下标,是相同的结果,每个下标都遍历了一次。 + ![](https://img.halfrost.com/Leetcode/leetcode_42_1.png) +- 每个 i 的宽度固定为 1,所以每个“坑”只需要求出高度,即当前这个“坑”能积攒的雨水。最后依次将每个“坑”中的雨水相加即是能接到的雨水数。 + ![](https://img.halfrost.com/Leetcode/leetcode_42_0.png) ## 代码 ```go - package leetcode func trap(height []int) int { @@ -57,10 +56,11 @@ func trap(height []int) int { } return res } - ``` + + ----------------------------------------------

⬅️上一页

diff --git a/website/content/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md b/website/content/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md index b8453ec3..b275e3db 100644 --- a/website/content/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md +++ b/website/content/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md @@ -99,5 +99,5 @@ func isNoZero(n int) bool { ----------------------------------------------

⬅️上一页

-

下一页➡️

+

下一页➡️

diff --git a/website/content/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md b/website/content/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md new file mode 100644 index 00000000..05914774 --- /dev/null +++ b/website/content/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md @@ -0,0 +1,97 @@ +# [1319. Number of Operations to Make Network Connected](https://leetcode.com/problems/number-of-operations-to-make-network-connected/) + + +## 题目 + +There are `n` computers numbered from `0` to `n-1` connected by ethernet cables `connections` forming a network where `connections[i] = [a, b]` represents a connection between computers `a` and `b`. Any computer can reach any other computer directly or indirectly through the network. + +Given an initial computer network `connections`. You can extract certain cables between two directly connected computers, and place them between any pair of disconnected computers to make them directly connected. Return the *minimum number of times* you need to do this in order to make all the computers connected. If it's not possible, return -1. + +**Example 1:** + +![https://assets.leetcode.com/uploads/2020/01/02/sample_1_1677.png](https://assets.leetcode.com/uploads/2020/01/02/sample_1_1677.png) + +``` +Input: n = 4, connections = [[0,1],[0,2],[1,2]] +Output: 1 +Explanation: Remove cable between computer 1 and 2 and place between computers 1 and 3. +``` + +**Example 2:** + +![https://assets.leetcode.com/uploads/2020/01/02/sample_2_1677.png](https://assets.leetcode.com/uploads/2020/01/02/sample_2_1677.png) + +``` +Input: n = 6, connections = [[0,1],[0,2],[0,3],[1,2],[1,3]] +Output: 2 +``` + +**Example 3:** + +``` +Input: n = 6, connections = [[0,1],[0,2],[0,3],[1,2]] +Output: -1 +Explanation: There are not enough cables. +``` + +**Example 4:** + +``` +Input: n = 5, connections = [[0,1],[0,2],[3,4],[2,3]] +Output: 0 +``` + +**Constraints:** + +- `1 <= n <= 10^5` +- `1 <= connections.length <= min(n*(n-1)/2, 10^5)` +- `connections[i].length == 2` +- `0 <= connections[i][0], connections[i][1] < n` +- `connections[i][0] != connections[i][1]` +- There are no repeated connections. +- No two computers are connected by more than one cable. + +## 题目大意 + +用以太网线缆将 n 台计算机连接成一个网络,计算机的编号从 0 到 n-1。线缆用 connections 表示,其中 connections[i] = [a, b] 连接了计算机 a 和 b。网络中的任何一台计算机都可以通过网络直接或者间接访问同一个网络中其他任意一台计算机。给你这个计算机网络的初始布线 connections,你可以拔开任意两台直连计算机之间的线缆,并用它连接一对未直连的计算机。请你计算并返回使所有计算机都连通所需的最少操作次数。如果不可能,则返回 -1 。 + +## 解题思路 + +- 很明显这题的解题思路是并查集。先将每个 connections 构建出并查集。构建中需要累加冗余的连接。例如 2 个节点已经连通,再连接这个集合中的任意 2 个节点就算冗余连接。冗余连接的线都可以移动,去连接还没有连通的节点。计算出冗余连接数,再根据并查集的集合总数,即可得出答案。 +- 这一题答案有 3 种可能。第一种,所有点都在一个集合内,即全部连通,这时输出 0 。第二种,冗余的连接不够串起所有点,这时输出 -1 。第三种情况是可以连通的情况。 m 个集合需要连通,最少需要 m - 1 条线。如果冗余连接数大于 m - 1,则输出 m - 1 即可。 + +## 代码 + +```go +package leetcode + +import ( + "github.com/halfrost/LeetCode-Go/template" +) + +func makeConnected(n int, connections [][]int) int { + if n-1 > len(connections) { + return -1 + } + uf, redundance := template.UnionFind{}, 0 + uf.Init(n) + for _, connection := range connections { + if uf.Find(connection[0]) == uf.Find(connection[1]) { + redundance++ + } else { + uf.Union(connection[0], connection[1]) + } + } + if uf.TotalCount() == 1 || redundance < uf.TotalCount()-1 { + return 0 + } + return uf.TotalCount() - 1 +} +``` + + +---------------------------------------------- +
+

⬅️上一页

+

下一页➡️

+
diff --git a/website/content/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md b/website/content/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md index 264dc72f..81ce78e5 100644 --- a/website/content/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md +++ b/website/content/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md @@ -89,6 +89,6 @@ func luckyNumbers(matrix [][]int) []int { ----------------------------------------------
-

⬅️上一页

+

⬅️上一页

下一页➡️

diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index b39e8059..abaf0e96 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -39,16 +39,16 @@ type: docs |0079|Word Search|[Go]({{< relref "/ChapterFour/0079.Word-Search.md" >}})|Medium| O(n^2)| O(n^2)|❤️|36.6%| |0080|Remove Duplicates from Sorted Array II|[Go]({{< relref "/ChapterFour/0080.Remove-Duplicates-from-Sorted-Array-II.md" >}})|Medium| O(n)| O(1||45.9%| |0081|Search in Rotated Sorted Array II|[Go]({{< relref "/ChapterFour/0081.Search-in-Rotated-Sorted-Array-II.md" >}})|Medium||||33.5%| -|0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|36.8%| +|0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|36.9%| |0088|Merge Sorted Array|[Go]({{< relref "/ChapterFour/0088.Merge-Sorted-Array.md" >}})|Easy| O(n)| O(1)|❤️|40.6%| -|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.5%| +|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.6%| |0105|Construct Binary Tree from Preorder and Inorder Traversal|[Go]({{< relref "/ChapterFour/0105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md" >}})|Medium||||51.3%| |0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go]({{< relref "/ChapterFour/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal.md" >}})|Medium||||49.2%| |0118|Pascal's Triangle|[Go]({{< relref "/ChapterFour/0118.Pascals-Triangle.md" >}})|Easy||||54.4%| |0120|Triangle|[Go]({{< relref "/ChapterFour/0120.Triangle.md" >}})|Medium| O(n^2)| O(n)||45.5%| |0121|Best Time to Buy and Sell Stock|[Go]({{< relref "/ChapterFour/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}})|Easy| O(n)| O(1)||51.3%| |0122|Best Time to Buy and Sell Stock II|[Go]({{< relref "/ChapterFour/0122.Best-Time-to-Buy-and-Sell-Stock-II.md" >}})|Easy| O(n)| O(1)||58.3%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.4%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.5%| |0128|Longest Consecutive Sequence|[Go]({{< relref "/ChapterFour/0128.Longest-Consecutive-Sequence.md" >}})|Hard||||46.1%| |0152|Maximum Product Subarray|[Go]({{< relref "/ChapterFour/0152.Maximum-Product-Subarray.md" >}})|Medium| O(n)| O(1)||32.6%| |0153|Find Minimum in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0153.Find-Minimum-in-Rotated-Sorted-Array.md" >}})|Medium||||45.9%| @@ -62,17 +62,17 @@ type: docs |0217|Contains Duplicate|[Go]({{< relref "/ChapterFour/0217.Contains-Duplicate.md" >}})|Easy| O(n)| O(n)||56.5%| |0219|Contains Duplicate II|[Go]({{< relref "/ChapterFour/0219.Contains-Duplicate-II.md" >}})|Easy| O(n)| O(n)||38.5%| |0228|Summary Ranges|[Go]({{< relref "/ChapterFour/0228.Summary-Ranges.md" >}})|Easy||||42.1%| -|0229|Majority Element II|[Go]({{< relref "/ChapterFour/0229.Majority-Element-II.md" >}})|Medium||||38.5%| +|0229|Majority Element II|[Go]({{< relref "/ChapterFour/0229.Majority-Element-II.md" >}})|Medium||||38.6%| |0268|Missing Number|[Go]({{< relref "/ChapterFour/0268.Missing-Number.md" >}})|Easy||||53.5%| |0283|Move Zeroes|[Go]({{< relref "/ChapterFour/0283.Move-Zeroes.md" >}})|Easy| O(n)| O(1)||58.5%| |0287|Find the Duplicate Number|[Go]({{< relref "/ChapterFour/0287.Find-the-Duplicate-Number.md" >}})|Medium| O(n)| O(1)|❤️|57.2%| -|0414|Third Maximum Number|[Go]({{< relref "/ChapterFour/0414.Third-Maximum-Number.md" >}})|Easy||||30.6%| +|0414|Third Maximum Number|[Go]({{< relref "/ChapterFour/0414.Third-Maximum-Number.md" >}})|Easy||||30.7%| |0448|Find All Numbers Disappeared in an Array|[Go]({{< relref "/ChapterFour/0448.Find-All-Numbers-Disappeared-in-an-Array.md" >}})|Easy||||56.1%| |0457|Circular Array Loop|[Go]({{< relref "/ChapterFour/0457.Circular-Array-Loop.md" >}})|Medium||||30.0%| |0485|Max Consecutive Ones|[Go]({{< relref "/ChapterFour/0485.Max-Consecutive-Ones.md" >}})|Easy||||53.2%| |0509|Fibonacci Number|[Go]({{< relref "/ChapterFour/0509.Fibonacci-Number.md" >}})|Easy||||67.3%| |0532|K-diff Pairs in an Array|[Go]({{< relref "/ChapterFour/0532.K-diff-Pairs-in-an-Array.md" >}})|Medium| O(n)| O(n)||34.9%| -|0561|Array Partition I|[Go]({{< relref "/ChapterFour/0561.Array-Partition-I.md" >}})|Easy||||72.9%| +|0561|Array Partition I|[Go]({{< relref "/ChapterFour/0561.Array-Partition-I.md" >}})|Easy||||73.0%| |0566|Reshape the Matrix|[Go]({{< relref "/ChapterFour/0566.Reshape-the-Matrix.md" >}})|Easy| O(n^2)| O(n^2)||61.0%| |0605|Can Place Flowers|[Go]({{< relref "/ChapterFour/0605.Can-Place-Flowers.md" >}})|Easy||||31.9%| |0628|Maximum Product of Three Numbers|[Go]({{< relref "/ChapterFour/0628.Maximum-Product-of-Three-Numbers.md" >}})|Easy| O(n)| O(1)||47.0%| @@ -95,7 +95,7 @@ type: docs |0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||32.9%| |0896|Monotonic Array|[Go]({{< relref "/ChapterFour/0896.Monotonic-Array.md" >}})|Easy||||58.0%| |0907|Sum of Subarray Minimums|[Go]({{< relref "/ChapterFour/0907.Sum-of-Subarray-Minimums.md" >}})|Medium| O(n)| O(n)|❤️|33.2%| -|0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||34.4%| +|0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||34.3%| |0918|Maximum Sum Circular Subarray|[Go]({{< relref "/ChapterFour/0918.Maximum-Sum-Circular-Subarray.md" >}})|Medium||||34.1%| |0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1)||70.3%| |0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0969.Pancake-Sorting.md" >}})|Medium| O(n)| O(1)|❤️|68.6%| @@ -103,7 +103,7 @@ type: docs |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.6%| |0985|Sum of Even Numbers After Queries|[Go]({{< relref "/ChapterFour/0985.Sum-of-Even-Numbers-After-Queries.md" >}})|Easy||||60.7%| |0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||44.7%| -|0999|Available Captures for Rook|[Go]({{< relref "/ChapterFour/0999.Available-Captures-for-Rook.md" >}})|Easy||||66.9%| +|0999|Available Captures for Rook|[Go]({{< relref "/ChapterFour/0999.Available-Captures-for-Rook.md" >}})|Easy||||67.0%| |1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1002.Find-Common-Characters.md" >}})|Easy||||68.2%| |1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.6%| |1018|Binary Prefix Divisible By 5|[Go]({{< relref "/ChapterFour/1018.Binary-Prefix-Divisible-By-5.md" >}})|Easy||||47.8%| @@ -117,14 +117,14 @@ type: docs |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||39.6%| |1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.5%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||59.5%| -|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||54.2%| +|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||54.1%| |1185|Day of the Week|[Go]({{< relref "/ChapterFour/1185.Day-of-the-Week.md" >}})|Easy||||61.9%| |1200|Minimum Absolute Difference|[Go]({{< relref "/ChapterFour/1200.Minimum-Absolute-Difference.md" >}})|Easy||||66.8%| |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1202.Smallest-String-With-Swaps.md" >}})|Medium||||48.5%| |1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||43.7%| |1217|Minimum Cost to Move Chips to The Same Position|[Go]({{< relref "/ChapterFour/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position.md" >}})|Easy||||71.2%| |1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.8%| -|1252|Cells with Odd Values in a Matrix|[Go]({{< relref "/ChapterFour/1252.Cells-with-Odd-Values-in-a-Matrix.md" >}})|Easy||||78.7%| +|1252|Cells with Odd Values in a Matrix|[Go]({{< relref "/ChapterFour/1252.Cells-with-Odd-Values-in-a-Matrix.md" >}})|Easy||||78.8%| |1260|Shift 2D Grid|[Go]({{< relref "/ChapterFour/1260.Shift-2D-Grid.md" >}})|Easy||||61.8%| |1266|Minimum Time Visiting All Points|[Go]({{< relref "/ChapterFour/1266.Minimum-Time-Visiting-All-Points.md" >}})|Easy||||79.4%| |1275|Find Winner on a Tic Tac Toe Game|[Go]({{< relref "/ChapterFour/1275.Find-Winner-on-a-Tic-Tac-Toe-Game.md" >}})|Easy||||53.0%| @@ -132,20 +132,20 @@ type: docs |1295|Find Numbers with Even Number of Digits|[Go]({{< relref "/ChapterFour/1295.Find-Numbers-with-Even-Number-of-Digits.md" >}})|Easy||||79.3%| |1299|Replace Elements with Greatest Element on Right Side|[Go]({{< relref "/ChapterFour/1299.Replace-Elements-with-Greatest-Element-on-Right-Side.md" >}})|Easy||||74.3%| |1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.3%| -|1304|Find N Unique Integers Sum up to Zero|[Go]({{< relref "/ChapterFour/1304.Find-N-Unique-Integers-Sum-up-to-Zero.md" >}})|Easy||||76.7%| +|1304|Find N Unique Integers Sum up to Zero|[Go]({{< relref "/ChapterFour/1304.Find-N-Unique-Integers-Sum-up-to-Zero.md" >}})|Easy||||76.8%| |1313|Decompress Run-Length Encoded List|[Go]({{< relref "/ChapterFour/1313.Decompress-Run-Length-Encoded-List.md" >}})|Easy||||85.4%| |1380|Lucky Numbers in a Matrix|[Go]({{< relref "/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md" >}})|Easy||||70.8%| |1385|Find the Distance Value Between Two Arrays|[Go]({{< relref "/ChapterFour/1385.Find-the-Distance-Value-Between-Two-Arrays.md" >}})|Easy||||66.4%| |1389|Create Target Array in the Given Order|[Go]({{< relref "/ChapterFour/1389.Create-Target-Array-in-the-Given-Order.md" >}})|Easy||||84.8%| -|1464|Maximum Product of Two Elements in an Array|[Go]({{< relref "/ChapterFour/1464.Maximum-Product-of-Two-Elements-in-an-Array.md" >}})|Easy||||77.0%| +|1464|Maximum Product of Two Elements in an Array|[Go]({{< relref "/ChapterFour/1464.Maximum-Product-of-Two-Elements-in-an-Array.md" >}})|Easy||||77.1%| |1470|Shuffle the Array|[Go]({{< relref "/ChapterFour/1470.Shuffle-the-Array.md" >}})|Easy||||88.5%| |1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||89.5%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%| |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.2%| -|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||61.2%| +|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||60.9%| |1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.5%| -|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1652.Defuse-the-Bomb.md" >}})|Easy||||63.9%| -|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.3%| +|1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1652.Defuse-the-Bomb.md" >}})|Easy||||63.8%| +|1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.1%| |1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.4%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index 5fab636c..c6a2d3a2 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -101,23 +101,23 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0017|Letter Combinations of a Phone Number|[Go]({{< relref "/ChapterFour/0017.Letter-Combinations-of-a-Phone-Number.md" >}})|Medium| O(log n)| O(1)||48.7%| |0022|Generate Parentheses|[Go]({{< relref "/ChapterFour/0022.Generate-Parentheses.md" >}})|Medium| O(log n)| O(1)||64.9%| -|0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|46.0%| +|0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|46.1%| |0039|Combination Sum|[Go]({{< relref "/ChapterFour/0039.Combination-Sum.md" >}})|Medium| O(n log n)| O(n)||58.8%| |0040|Combination Sum II|[Go]({{< relref "/ChapterFour/0040.Combination-Sum-II.md" >}})|Medium| O(n log n)| O(n)||49.9%| |0046|Permutations|[Go]({{< relref "/ChapterFour/0046.Permutations.md" >}})|Medium| O(n)| O(n)|❤️|66.1%| |0047|Permutations II|[Go]({{< relref "/ChapterFour/0047.Permutations-II.md" >}})|Medium| O(n^2)| O(n)|❤️|49.1%| -|0051|N-Queens|[Go]({{< relref "/ChapterFour/0051.N-Queens.md" >}})|Hard| O(n^2)| O(n)|❤️|49.1%| +|0051|N-Queens|[Go]({{< relref "/ChapterFour/0051.N-Queens.md" >}})|Hard| O(n^2)| O(n)|❤️|49.2%| |0052|N-Queens II|[Go]({{< relref "/ChapterFour/0052.N-Queens-II.md" >}})|Hard| O(n^2)| O(n)|❤️|59.8%| |0060|Permutation Sequence|[Go]({{< relref "/ChapterFour/0060.Permutation-Sequence.md" >}})|Hard| O(n log n)| O(1)||39.2%| |0077|Combinations|[Go]({{< relref "/ChapterFour/0077.Combinations.md" >}})|Medium| O(n)| O(n)|❤️|57.0%| |0078|Subsets|[Go]({{< relref "/ChapterFour/0078.Subsets.md" >}})|Medium| O(n^2)| O(n)|❤️|64.6%| |0079|Word Search|[Go]({{< relref "/ChapterFour/0079.Word-Search.md" >}})|Medium| O(n^2)| O(n^2)|❤️|36.6%| |0089|Gray Code|[Go]({{< relref "/ChapterFour/0089.Gray-Code.md" >}})|Medium| O(n)| O(1)||50.1%| -|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.5%| +|0090|Subsets II|[Go]({{< relref "/ChapterFour/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|48.6%| |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|37.3%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.4%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|51.4%| -|0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium| O(n)| O(n)|❤️|39.8%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.5%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|51.5%| +|0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium| O(n)| O(n)|❤️|39.9%| |0212|Word Search II|[Go]({{< relref "/ChapterFour/0212.Word-Search-II.md" >}})|Hard| O(n^2)| O(n^2)|❤️|36.6%| |0216|Combination Sum III|[Go]({{< relref "/ChapterFour/0216.Combination-Sum-III.md" >}})|Medium| O(n)| O(1)|❤️|60.0%| |0306|Additive Number|[Go]({{< relref "/ChapterFour/0306.Additive-Number.md" >}})|Medium| O(n^2)| O(1)|❤️|29.6%| @@ -129,7 +129,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.2%| |0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.0%| |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|75.8%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.4%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.3%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.5%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.2%| |1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1681.Minimum-Incompatibility.md" >}})|Hard||||35.1%| diff --git a/website/content/ChapterTwo/Binary_Indexed_Tree.md b/website/content/ChapterTwo/Binary_Indexed_Tree.md index 112996e0..cd0507ba 100644 --- a/website/content/ChapterTwo/Binary_Indexed_Tree.md +++ b/website/content/ChapterTwo/Binary_Indexed_Tree.md @@ -10,7 +10,7 @@ type: docs | No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance | |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0218|The Skyline Problem|[Go]({{< relref "/ChapterFour/0218.The-Skyline-Problem.md" >}})|Hard||||36.1%| -|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium||||36.6%| +|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium||||36.5%| |0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard||||42.6%| |0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0327.Count-of-Range-Sum.md" >}})|Hard||||35.9%| |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0493.Reverse-Pairs.md" >}})|Hard||||26.6%| diff --git a/website/content/ChapterTwo/Binary_Search.md b/website/content/ChapterTwo/Binary_Search.md index 1777b53e..10c7c9af 100644 --- a/website/content/ChapterTwo/Binary_Search.md +++ b/website/content/ChapterTwo/Binary_Search.md @@ -163,11 +163,11 @@ func peakIndexInMountainArray(A []int) int { |0436|Find Right Interval|[Go]({{< relref "/ChapterFour/0436.Find-Right-Interval.md" >}})|Medium||||48.4%| |0441|Arranging Coins|[Go]({{< relref "/ChapterFour/0441.Arranging-Coins.md" >}})|Easy||||42.3%| |0454|4Sum II|[Go]({{< relref "/ChapterFour/0454.4Sum-II.md" >}})|Medium| O(n^2)| O(n) ||54.5%| -|0475|Heaters|[Go]({{< relref "/ChapterFour/0475.Heaters.md" >}})|Medium||||33.5%| +|0475|Heaters|[Go]({{< relref "/ChapterFour/0475.Heaters.md" >}})|Medium||||33.6%| |0483|Smallest Good Base|[Go]({{< relref "/ChapterFour/0483.Smallest-Good-Base.md" >}})|Hard||||36.2%| |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0493.Reverse-Pairs.md" >}})|Hard||||26.6%| -|0497|Random Point in Non-overlapping Rectangles|[Go]({{< relref "/ChapterFour/0497.Random-Point-in-Non-overlapping-Rectangles.md" >}})|Medium||||39.1%| -|0528|Random Pick with Weight|[Go]({{< relref "/ChapterFour/0528.Random-Pick-with-Weight.md" >}})|Medium||||44.5%| +|0497|Random Point in Non-overlapping Rectangles|[Go]({{< relref "/ChapterFour/0497.Random-Point-in-Non-overlapping-Rectangles.md" >}})|Medium||||39.0%| +|0528|Random Pick with Weight|[Go]({{< relref "/ChapterFour/0528.Random-Pick-with-Weight.md" >}})|Medium||||44.6%| |0658|Find K Closest Elements|[Go]({{< relref "/ChapterFour/0658.Find-K-Closest-Elements.md" >}})|Medium||||41.8%| |0668|Kth Smallest Number in Multiplication Table|[Go]({{< relref "/ChapterFour/0668.Kth-Smallest-Number-in-Multiplication-Table.md" >}})|Hard||||47.7%| |0704|Binary Search|[Go]({{< relref "/ChapterFour/0704.Binary-Search.md" >}})|Easy||||54.0%| @@ -187,12 +187,12 @@ func peakIndexInMountainArray(A []int) int { |0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0927.Three-Equal-Parts.md" >}})|Hard||||34.5%| |0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||54.0%| |1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.6%| -|1111|Maximum Nesting Depth of Two Valid Parentheses Strings|[Go]({{< relref "/ChapterFour/1111.Maximum-Nesting-Depth-of-Two-Valid-Parentheses-Strings.md" >}})|Medium||||72.4%| +|1111|Maximum Nesting Depth of Two Valid Parentheses Strings|[Go]({{< relref "/ChapterFour/1111.Maximum-Nesting-Depth-of-Two-Valid-Parentheses-Strings.md" >}})|Medium||||72.5%| |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||39.6%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||59.5%| |1201|Ugly Number III|[Go]({{< relref "/ChapterFour/1201.Ugly-Number-III.md" >}})|Medium||||26.4%| |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||46.9%| -|1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||49.2%| +|1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||49.3%| |1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.3%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||36.1%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/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 158ee343..33ed4171 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -63,11 +63,11 @@ X & ~X = 0 |0397|Integer Replacement|[Go]({{< relref "/ChapterFour/0397.Integer-Replacement.md" >}})|Medium| O(n)| O(1)||33.4%| |0401|Binary Watch|[Go]({{< relref "/ChapterFour/0401.Binary-Watch.md" >}})|Easy| O(1)| O(1)||48.3%| |0405|Convert a Number to Hexadecimal|[Go]({{< relref "/ChapterFour/0405.Convert-a-Number-to-Hexadecimal.md" >}})|Easy| O(n)| O(1)||44.4%| -|0421|Maximum XOR of Two Numbers in an Array|[Go]({{< relref "/ChapterFour/0421.Maximum-XOR-of-Two-Numbers-in-an-Array.md" >}})|Medium| O(n)| O(1)|❤️|53.9%| +|0421|Maximum XOR of Two Numbers in an Array|[Go]({{< relref "/ChapterFour/0421.Maximum-XOR-of-Two-Numbers-in-an-Array.md" >}})|Medium| O(n)| O(1)|❤️|54.0%| |0461|Hamming Distance|[Go]({{< relref "/ChapterFour/0461.Hamming-Distance.md" >}})|Easy| O(n)| O(1)||73.1%| |0476|Number Complement|[Go]({{< relref "/ChapterFour/0476.Number-Complement.md" >}})|Easy| O(n)| O(1)||65.1%| |0477|Total Hamming Distance|[Go]({{< relref "/ChapterFour/0477.Total-Hamming-Distance.md" >}})|Medium| O(n)| O(1)||50.6%| -|0693|Binary Number with Alternating Bits|[Go]({{< relref "/ChapterFour/0693.Binary-Number-with-Alternating-Bits.md" >}})|Easy| O(n)| O(1)|❤️|59.7%| +|0693|Binary Number with Alternating Bits|[Go]({{< relref "/ChapterFour/0693.Binary-Number-with-Alternating-Bits.md" >}})|Easy| O(n)| O(1)|❤️|59.8%| |0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0756.Pyramid-Transition-Matrix.md" >}})|Medium| O(n log n)| O(n)||55.4%| |0762|Prime Number of Set Bits in Binary Representation|[Go]({{< relref "/ChapterFour/0762.Prime-Number-of-Set-Bits-in-Binary-Representation.md" >}})|Easy| O(n)| O(1)||64.2%| |0784|Letter Case Permutation|[Go]({{< relref "/ChapterFour/0784.Letter-Case-Permutation.md" >}})|Medium| O(n)| O(1)||66.2%| diff --git a/website/content/ChapterTwo/Breadth_First_Search.md b/website/content/ChapterTwo/Breadth_First_Search.md index ca2728a1..2a9c50b3 100644 --- a/website/content/ChapterTwo/Breadth_First_Search.md +++ b/website/content/ChapterTwo/Breadth_First_Search.md @@ -13,28 +13,28 @@ type: docs |0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||49.8%| |0107|Binary Tree Level Order Traversal II|[Go]({{< relref "/ChapterFour/0107.Binary-Tree-Level-Order-Traversal-II.md" >}})|Easy| O(n)| O(1)||54.9%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.3%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.4%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.5%| |0127|Word Ladder|[Go]({{< relref "/ChapterFour/0127.Word-Ladder.md" >}})|Hard| O(n)| O(n)||31.5%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0130.Surrounded-Regions.md" >}})|Medium||||29.2%| |0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||55.8%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||48.7%| |0207|Course Schedule|[Go]({{< relref "/ChapterFour/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||42.3%| -|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.4%| +|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.3%| |0515|Find Largest Value in Each Tree Row|[Go]({{< relref "/ChapterFour/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}})|Medium| O(n)| O(n)||62.0%| |0529|Minesweeper|[Go]({{< relref "/ChapterFour/0529.Minesweeper.md" >}})|Medium||||60.7%| -|0542|01 Matrix|[Go]({{< relref "/ChapterFour/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||40.6%| +|0542|01 Matrix|[Go]({{< relref "/ChapterFour/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||40.7%| |0785|Is Graph Bipartite?|[Go]({{< relref "/ChapterFour/0785.Is-Graph-Bipartite.md" >}})|Medium||||48.2%| |0815|Bus Routes|[Go]({{< relref "/ChapterFour/0815.Bus-Routes.md" >}})|Hard||||43.3%| |0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||57.5%| -|0864|Shortest Path to Get All Keys|[Go]({{< relref "/ChapterFour/0864.Shortest-Path-to-Get-All-Keys.md" >}})|Hard||||41.5%| +|0864|Shortest Path to Get All Keys|[Go]({{< relref "/ChapterFour/0864.Shortest-Path-to-Get-All-Keys.md" >}})|Hard||||41.6%| |0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1306.Jump-Game-III.md" >}})|Medium||||62.6%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||54.9%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||26.2%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| - ----------------------------------------------

⬅️上一页

diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index b9e67f58..fc7709b2 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -26,23 +26,23 @@ type: docs |0124|Binary Tree Maximum Path Sum|[Go]({{< relref "/ChapterFour/0124.Binary-Tree-Maximum-Path-Sum.md" >}})|Hard| O(n)| O(1)||35.3%| |0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||50.6%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0130.Surrounded-Regions.md" >}})|Medium||||29.2%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium||||51.4%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium||||51.5%| |0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||55.8%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||48.7%| |0207|Course Schedule|[Go]({{< relref "/ChapterFour/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||42.3%| -|0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium||||39.8%| +|0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium||||39.9%| |0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||53.2%| |0329|Longest Increasing Path in a Matrix|[Go]({{< relref "/ChapterFour/0329.Longest-Increasing-Path-in-a-Matrix.md" >}})|Hard||||44.5%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0337.House-Robber-III.md" >}})|Medium||||51.7%| |0394|Decode String|[Go]({{< relref "/ChapterFour/0394.Decode-String.md" >}})|Medium| O(n)| O(n)||52.4%| |0491|Increasing Subsequences|[Go]({{< relref "/ChapterFour/0491.Increasing-Subsequences.md" >}})|Medium||||47.4%| |0494|Target Sum|[Go]({{< relref "/ChapterFour/0494.Target-Sum.md" >}})|Medium||||45.8%| -|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.4%| +|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.3%| |0515|Find Largest Value in Each Tree Row|[Go]({{< relref "/ChapterFour/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}})|Medium| O(n)| O(n)||62.0%| |0526|Beautiful Arrangement|[Go]({{< relref "/ChapterFour/0526.Beautiful-Arrangement.md" >}})|Medium||||61.7%| |0529|Minesweeper|[Go]({{< relref "/ChapterFour/0529.Minesweeper.md" >}})|Medium||||60.7%| -|0542|01 Matrix|[Go]({{< relref "/ChapterFour/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||40.6%| +|0542|01 Matrix|[Go]({{< relref "/ChapterFour/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||40.7%| |0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0547.Number-of-Provinces.md" >}})|Medium||||60.2%| |0563|Binary Tree Tilt|[Go]({{< relref "/ChapterFour/0563.Binary-Tree-Tilt.md" >}})|Easy||||52.7%| |0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0638.Shopping-Offers.md" >}})|Medium||||52.6%| @@ -60,7 +60,7 @@ type: docs |0841|Keys and Rooms|[Go]({{< relref "/ChapterFour/0841.Keys-and-Rooms.md" >}})|Medium||||65.2%| |0851|Loud and Rich|[Go]({{< relref "/ChapterFour/0851.Loud-and-Rich.md" >}})|Medium||||52.5%| |0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||57.5%| -|0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.5%| +|0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.6%| |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.4%| |0924|Minimize Malware Spread|[Go]({{< relref "/ChapterFour/0924.Minimize-Malware-Spread.md" >}})|Hard||||41.8%| |0928|Minimize Malware Spread II|[Go]({{< relref "/ChapterFour/0928.Minimize-Malware-Spread-II.md" >}})|Hard||||41.2%| @@ -71,14 +71,15 @@ type: docs |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.2%| |1020|Number of Enclaves|[Go]({{< relref "/ChapterFour/1020.Number-of-Enclaves.md" >}})|Medium||||58.7%| |1026|Maximum Difference Between Node and Ancestor|[Go]({{< relref "/ChapterFour/1026.Maximum-Difference-Between-Node-and-Ancestor.md" >}})|Medium||||69.2%| -|1028|Recover a Tree From Preorder Traversal|[Go]({{< relref "/ChapterFour/1028.Recover-a-Tree-From-Preorder-Traversal.md" >}})|Hard||||70.7%| +|1028|Recover a Tree From Preorder Traversal|[Go]({{< relref "/ChapterFour/1028.Recover-a-Tree-From-Preorder-Traversal.md" >}})|Hard||||70.8%| |1110|Delete Nodes And Return Forest|[Go]({{< relref "/ChapterFour/1110.Delete-Nodes-And-Return-Forest.md" >}})|Medium||||67.6%| |1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||67.9%| |1145|Binary Tree Coloring Game|[Go]({{< relref "/ChapterFour/1145.Binary-Tree-Coloring-Game.md" >}})|Medium||||51.4%| -|1203|Sort Items by Groups Respecting Dependencies|[Go]({{< relref "/ChapterFour/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})|Hard||||49.0%| -|1254|Number of Closed Islands|[Go]({{< relref "/ChapterFour/1254.Number-of-Closed-Islands.md" >}})|Medium||||61.4%| +|1203|Sort Items by Groups Respecting Dependencies|[Go]({{< relref "/ChapterFour/1203.Sort-Items-by-Groups-Respecting-Dependencies.md" >}})|Hard||||49.1%| +|1254|Number of Closed Islands|[Go]({{< relref "/ChapterFour/1254.Number-of-Closed-Islands.md" >}})|Medium||||61.5%| |1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1302.Deepest-Leaves-Sum.md" >}})|Medium||||84.1%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1306.Jump-Game-III.md" >}})|Medium||||62.6%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||54.9%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Dynamic_Programming.md b/website/content/ChapterTwo/Dynamic_Programming.md index 29151122..cf91d4e8 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -19,13 +19,13 @@ type: docs |0096|Unique Binary Search Trees|[Go]({{< relref "/ChapterFour/0096.Unique-Binary-Search-Trees.md" >}})|Medium| O(n)| O(n)||54.2%| |0120|Triangle|[Go]({{< relref "/ChapterFour/0120.Triangle.md" >}})|Medium| O(n^2)| O(n)||45.5%| |0121|Best Time to Buy and Sell Stock|[Go]({{< relref "/ChapterFour/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}})|Easy| O(n)| O(1)||51.3%| -|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium||||51.4%| +|0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0131.Palindrome-Partitioning.md" >}})|Medium||||51.5%| |0152|Maximum Product Subarray|[Go]({{< relref "/ChapterFour/0152.Maximum-Product-Subarray.md" >}})|Medium| O(n)| O(1)||32.6%| |0174|Dungeon Game|[Go]({{< relref "/ChapterFour/0174.Dungeon-Game.md" >}})|Hard||||33.2%| |0198|House Robber|[Go]({{< relref "/ChapterFour/0198.House-Robber.md" >}})|Medium| O(n)| O(n)||42.8%| |0213|House Robber II|[Go]({{< relref "/ChapterFour/0213.House-Robber-II.md" >}})|Medium| O(n)| O(n)||37.4%| |0300|Longest Increasing Subsequence|[Go]({{< relref "/ChapterFour/0300.Longest-Increasing-Subsequence.md" >}})|Medium| O(n log n)| O(n)||43.7%| -|0303|Range Sum Query - Immutable|[Go]({{< relref "/ChapterFour/0303.Range-Sum-Query---Immutable.md" >}})|Easy||||47.1%| +|0303|Range Sum Query - Immutable|[Go]({{< relref "/ChapterFour/0303.Range-Sum-Query---Immutable.md" >}})|Easy||||47.2%| |0309|Best Time to Buy and Sell Stock with Cooldown|[Go]({{< relref "/ChapterFour/0309.Best-Time-to-Buy-and-Sell-Stock-with-Cooldown.md" >}})|Medium| O(n)| O(n)||48.1%| |0322|Coin Change|[Go]({{< relref "/ChapterFour/0322.Coin-Change.md" >}})|Medium| O(n)| O(n)||37.0%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0337.House-Robber-III.md" >}})|Medium||||51.7%| @@ -45,15 +45,15 @@ type: docs |0838|Push Dominoes|[Go]({{< relref "/ChapterFour/0838.Push-Dominoes.md" >}})|Medium| O(n)| O(n)||49.7%| |0887|Super Egg Drop|[Go]({{< relref "/ChapterFour/0887.Super-Egg-Drop.md" >}})|Hard||||27.0%| |0898|Bitwise ORs of Subarrays|[Go]({{< relref "/ChapterFour/0898.Bitwise-ORs-of-Subarrays.md" >}})|Medium||||34.0%| -|0920|Number of Music Playlists|[Go]({{< relref "/ChapterFour/0920.Number-of-Music-Playlists.md" >}})|Hard||||47.6%| +|0920|Number of Music Playlists|[Go]({{< relref "/ChapterFour/0920.Number-of-Music-Playlists.md" >}})|Hard||||47.7%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0968.Binary-Tree-Cameras.md" >}})|Hard||||38.5%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.6%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.1%| -|1049|Last Stone Weight II|[Go]({{< relref "/ChapterFour/1049.Last-Stone-Weight-II.md" >}})|Medium||||45.0%| +|1049|Last Stone Weight II|[Go]({{< relref "/ChapterFour/1049.Last-Stone-Weight-II.md" >}})|Medium||||45.1%| |1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard||||61.5%| -|1105|Filling Bookcase Shelves|[Go]({{< relref "/ChapterFour/1105.Filling-Bookcase-Shelves.md" >}})|Medium||||57.7%| +|1105|Filling Bookcase Shelves|[Go]({{< relref "/ChapterFour/1105.Filling-Bookcase-Shelves.md" >}})|Medium||||57.6%| |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||46.9%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.4%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.3%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||26.2%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.5%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.2%| diff --git a/website/content/ChapterTwo/Hash_Table.md b/website/content/ChapterTwo/Hash_Table.md index 262b8cc0..713f6995 100644 --- a/website/content/ChapterTwo/Hash_Table.md +++ b/website/content/ChapterTwo/Hash_Table.md @@ -13,7 +13,7 @@ type: docs |0018|4Sum|[Go]({{< relref "/ChapterFour/0018.4Sum.md" >}})|Medium| O(n^3)| O(n^2)|❤️|34.7%| |0030|Substring with Concatenation of All Words|[Go]({{< relref "/ChapterFour/0030.Substring-with-Concatenation-of-All-Words.md" >}})|Hard| O(n)| O(n)|❤️|26.1%| |0036|Valid Sudoku|[Go]({{< relref "/ChapterFour/0036.Valid-Sudoku.md" >}})|Medium| O(n^2)| O(n^2)||50.2%| -|0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|46.0%| +|0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|46.1%| |0049|Group Anagrams|[Go]({{< relref "/ChapterFour/0049.Group-Anagrams.md" >}})|Medium| O(n log n)| O(n)||58.9%| |0076|Minimum Window Substring|[Go]({{< relref "/ChapterFour/0076.Minimum-Window-Substring.md" >}})|Hard| O(n)| O(n)|❤️|35.7%| |0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||65.5%| @@ -38,11 +38,11 @@ type: docs |0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0447.Number-of-Boomerangs.md" >}})|Medium| O(n)| O(1) ||52.4%| |0451|Sort Characters By Frequency|[Go]({{< relref "/ChapterFour/0451.Sort-Characters-By-Frequency.md" >}})|Medium| O(n log n)| O(1) ||64.2%| |0454|4Sum II|[Go]({{< relref "/ChapterFour/0454.4Sum-II.md" >}})|Medium| O(n^2)| O(n) ||54.5%| -|0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0463.Island-Perimeter.md" >}})|Easy||||66.5%| +|0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0463.Island-Perimeter.md" >}})|Easy||||66.6%| |0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500.Keyboard-Row.md" >}})|Easy||||65.5%| |0508|Most Frequent Subtree Sum|[Go]({{< relref "/ChapterFour/0508.Most-Frequent-Subtree-Sum.md" >}})|Medium||||58.9%| |0575|Distribute Candies|[Go]({{< relref "/ChapterFour/0575.Distribute-Candies.md" >}})|Easy||||61.9%| -|0594|Longest Harmonious Subsequence|[Go]({{< relref "/ChapterFour/0594.Longest-Harmonious-Subsequence.md" >}})|Easy||||47.8%| +|0594|Longest Harmonious Subsequence|[Go]({{< relref "/ChapterFour/0594.Longest-Harmonious-Subsequence.md" >}})|Easy||||47.7%| |0599|Minimum Index Sum of Two Lists|[Go]({{< relref "/ChapterFour/0599.Minimum-Index-Sum-of-Two-Lists.md" >}})|Easy||||51.5%| |0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.0%| |0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0645.Set-Mismatch.md" >}})|Easy||||42.5%| @@ -74,7 +74,7 @@ type: docs |1207|Unique Number of Occurrences|[Go]({{< relref "/ChapterFour/1207.Unique-Number-of-Occurrences.md" >}})|Easy||||71.6%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%| |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.2%| -|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||61.2%| +|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||60.9%| |1679|Max Number of K-Sum Pairs|[Go]({{< relref "/ChapterFour/1679.Max-Number-of-K-Sum-Pairs.md" >}})|Medium||||54.4%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Linked_List.md b/website/content/ChapterTwo/Linked_List.md index 078d78f6..61f8dcc4 100644 --- a/website/content/ChapterTwo/Linked_List.md +++ b/website/content/ChapterTwo/Linked_List.md @@ -42,9 +42,9 @@ type: docs |0148|Sort List|[Go]({{< relref "/ChapterFour/0148.Sort-List.md" >}})|Medium| O(n log n)| O(n)|❤️|45.9%| |0160|Intersection of Two Linked Lists|[Go]({{< relref "/ChapterFour/0160.Intersection-of-Two-Linked-Lists.md" >}})|Easy| O(n)| O(1)|❤️|42.7%| |0203|Remove Linked List Elements|[Go]({{< relref "/ChapterFour/0203.Remove-Linked-List-Elements.md" >}})|Easy| O(n)| O(1)||39.1%| -|0206|Reverse Linked List|[Go]({{< relref "/ChapterFour/0206.Reverse-Linked-List.md" >}})|Easy| O(n)| O(1)||64.8%| +|0206|Reverse Linked List|[Go]({{< relref "/ChapterFour/0206.Reverse-Linked-List.md" >}})|Easy| O(n)| O(1)||64.9%| |0234|Palindrome Linked List|[Go]({{< relref "/ChapterFour/0234.Palindrome-Linked-List.md" >}})|Easy| O(n)| O(1)||40.3%| -|0237|Delete Node in a Linked List|[Go]({{< relref "/ChapterFour/0237.Delete-Node-in-a-Linked-List.md" >}})|Easy| O(n)| O(1)||66.3%| +|0237|Delete Node in a Linked List|[Go]({{< relref "/ChapterFour/0237.Delete-Node-in-a-Linked-List.md" >}})|Easy| O(n)| O(1)||66.4%| |0328|Odd Even Linked List|[Go]({{< relref "/ChapterFour/0328.Odd-Even-Linked-List.md" >}})|Medium| O(n)| O(1)||56.9%| |0445|Add Two Numbers II|[Go]({{< relref "/ChapterFour/0445.Add-Two-Numbers-II.md" >}})|Medium| O(n)| O(n)||56.1%| |0707|Design Linked List|[Go]({{< relref "/ChapterFour/0707.Design-Linked-List.md" >}})|Medium| O(n)| O(1)||25.8%| @@ -54,8 +54,8 @@ type: docs |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.2%| |1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go]({{< relref "/ChapterFour/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/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer.md" >}})|Easy||||81.7%| -|1669|Merge In Between Linked Lists|[Go]({{< relref "/ChapterFour/1669.Merge-In-Between-Linked-Lists.md" >}})|Medium||||78.1%| -|1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||54.7%| +|1669|Merge In Between Linked Lists|[Go]({{< relref "/ChapterFour/1669.Merge-In-Between-Linked-Lists.md" >}})|Medium||||78.0%| +|1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||54.6%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index 7bc8d7bb..207363e7 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -46,7 +46,7 @@ type: docs |0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0645.Set-Mismatch.md" >}})|Easy||||42.5%| |0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0753.Cracking-the-Safe.md" >}})|Hard||||52.1%| |0781|Rabbits in Forest|[Go]({{< relref "/ChapterFour/0781.Rabbits-in-Forest.md" >}})|Medium||||55.4%| -|0812|Largest Triangle Area|[Go]({{< relref "/ChapterFour/0812.Largest-Triangle-Area.md" >}})|Easy||||58.8%| +|0812|Largest Triangle Area|[Go]({{< relref "/ChapterFour/0812.Largest-Triangle-Area.md" >}})|Easy||||58.9%| |0836|Rectangle Overlap|[Go]({{< relref "/ChapterFour/0836.Rectangle-Overlap.md" >}})|Easy||||45.0%| |0878|Nth Magical Number|[Go]({{< relref "/ChapterFour/0878.Nth-Magical-Number.md" >}})|Hard||||28.9%| |0885|Spiral Matrix III|[Go]({{< relref "/ChapterFour/0885.Spiral-Matrix-III.md" >}})|Medium| O(n^2)| O(1)||70.6%| @@ -54,7 +54,7 @@ type: docs |0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||32.9%| |0892|Surface Area of 3D Shapes|[Go]({{< relref "/ChapterFour/0892.Surface-Area-of-3D-Shapes.md" >}})|Easy||||59.6%| |0910|Smallest Range II|[Go]({{< relref "/ChapterFour/0910.Smallest-Range-II.md" >}})|Medium||||31.2%| -|0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||34.4%| +|0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||34.3%| |0927|Three Equal Parts|[Go]({{< relref "/ChapterFour/0927.Three-Equal-Parts.md" >}})|Hard||||34.5%| |0942|DI String Match|[Go]({{< relref "/ChapterFour/0942.DI-String-Match.md" >}})|Easy| O(n)| O(1)||73.4%| |0949|Largest Time for Given Digits|[Go]({{< relref "/ChapterFour/0949.Largest-Time-for-Given-Digits.md" >}})|Medium||||36.2%| @@ -62,7 +62,7 @@ type: docs |0970|Powerful Integers|[Go]({{< relref "/ChapterFour/0970.Powerful-Integers.md" >}})|Easy||||39.9%| |0976|Largest Perimeter Triangle|[Go]({{< relref "/ChapterFour/0976.Largest-Perimeter-Triangle.md" >}})|Easy| O(n log n)| O(log n) ||58.5%| |0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.0%| -|1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1017.Convert-to-Base--2.md" >}})|Medium||||59.5%| +|1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1017.Convert-to-Base--2.md" >}})|Medium||||59.6%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.1%| |1037|Valid Boomerang|[Go]({{< relref "/ChapterFour/1037.Valid-Boomerang.md" >}})|Easy||||37.9%| |1073|Adding Two Negabinary Numbers|[Go]({{< relref "/ChapterFour/1073.Adding-Two-Negabinary-Numbers.md" >}})|Medium||||34.8%| @@ -75,9 +75,9 @@ type: docs |1281|Subtract the Product and Sum of Digits of an Integer|[Go]({{< relref "/ChapterFour/1281.Subtract-the-Product-and-Sum-of-Digits-of-an-Integer.md" >}})|Easy||||85.6%| |1317|Convert Integer to the Sum of Two No-Zero Integers|[Go]({{< relref "/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md" >}})|Easy||||56.8%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.4%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||77.3%| |1648|Sell Diminishing-Valued Colored Balls|[Go]({{< relref "/ChapterFour/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}})|Medium||||30.9%| -|1680|Concatenation of Consecutive Binary Numbers|[Go]({{< relref "/ChapterFour/1680.Concatenation-of-Consecutive-Binary-Numbers.md" >}})|Medium||||45.2%| +|1680|Concatenation of Consecutive Binary Numbers|[Go]({{< relref "/ChapterFour/1680.Concatenation-of-Consecutive-Binary-Numbers.md" >}})|Medium||||45.1%| |1685|Sum of Absolute Differences in a Sorted Array|[Go]({{< relref "/ChapterFour/1685.Sum-of-Absolute-Differences-in-a-Sorted-Array.md" >}})|Medium||||61.7%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Segment_Tree.md b/website/content/ChapterTwo/Segment_Tree.md index 9e4d1ad7..596eb8ea 100644 --- a/website/content/ChapterTwo/Segment_Tree.md +++ b/website/content/ChapterTwo/Segment_Tree.md @@ -37,7 +37,7 @@ type: docs | No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance | |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0218|The Skyline Problem|[Go]({{< relref "/ChapterFour/0218.The-Skyline-Problem.md" >}})|Hard| O(n log n)| O(n)|❤️|36.1%| -|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium| O(1)| O(n)||36.6%| +|0307|Range Sum Query - Mutable|[Go]({{< relref "/ChapterFour/0307.Range-Sum-Query---Mutable.md" >}})|Medium| O(1)| O(n)||36.5%| |0315|Count of Smaller Numbers After Self|[Go]({{< relref "/ChapterFour/0315.Count-of-Smaller-Numbers-After-Self.md" >}})|Hard| O(n log n)| O(n)||42.6%| |0327|Count of Range Sum|[Go]({{< relref "/ChapterFour/0327.Count-of-Range-Sum.md" >}})|Hard| O(n log n)| O(n)|❤️|35.9%| |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0493.Reverse-Pairs.md" >}})|Hard| O(n log n)| O(n)||26.6%| diff --git a/website/content/ChapterTwo/Sort.md b/website/content/ChapterTwo/Sort.md index 810c5ddb..5a95d30a 100644 --- a/website/content/ChapterTwo/Sort.md +++ b/website/content/ChapterTwo/Sort.md @@ -46,7 +46,7 @@ type: docs |1122|Relative Sort Array|[Go]({{< relref "/ChapterFour/1122.Relative-Sort-Array.md" >}})|Easy||||67.8%| |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||46.9%| |1305|All Elements in Two Binary Search Trees|[Go]({{< relref "/ChapterFour/1305.All-Elements-in-Two-Binary-Search-Trees.md" >}})|Medium||||77.8%| -|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||61.2%| +|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||60.9%| |1647|Minimum Deletions to Make Character Frequencies Unique|[Go]({{< relref "/ChapterFour/1647.Minimum-Deletions-to-Make-Character-Frequencies-Unique.md" >}})|Medium||||53.8%| |1648|Sell Diminishing-Valued Colored Balls|[Go]({{< relref "/ChapterFour/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}})|Medium||||30.9%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Stack.md b/website/content/ChapterTwo/Stack.md index ae3b720a..484ed030 100644 --- a/website/content/ChapterTwo/Stack.md +++ b/website/content/ChapterTwo/Stack.md @@ -16,10 +16,10 @@ type: docs | No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance | |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | -|0020|Valid Parentheses|[Go]({{< relref "/ChapterFour/0020.Valid-Parentheses.md" >}})|Easy| O(log n)| O(1)||39.7%| +|0020|Valid Parentheses|[Go]({{< relref "/ChapterFour/0020.Valid-Parentheses.md" >}})|Easy| O(log n)| O(1)||39.8%| |0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|50.8%| |0071|Simplify Path|[Go]({{< relref "/ChapterFour/0071.Simplify-Path.md" >}})|Medium| O(n)| O(n)|❤️|33.6%| -|0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|36.8%| +|0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|36.9%| |0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||65.5%| |0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||49.8%| |0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||57.2%| @@ -48,13 +48,13 @@ type: docs |0895|Maximum Frequency Stack|[Go]({{< relref "/ChapterFour/0895.Maximum-Frequency-Stack.md" >}})|Hard| O(n)| O(n) ||62.2%| |0901|Online Stock Span|[Go]({{< relref "/ChapterFour/0901.Online-Stock-Span.md" >}})|Medium| O(n)| O(n) ||61.2%| |0907|Sum of Subarray Minimums|[Go]({{< relref "/ChapterFour/0907.Sum-of-Subarray-Minimums.md" >}})|Medium| O(n)| O(n)|❤️|33.2%| -|0921|Minimum Add to Make Parentheses Valid|[Go]({{< relref "/ChapterFour/0921.Minimum-Add-to-Make-Parentheses-Valid.md" >}})|Medium| O(n)| O(n)||74.6%| -|0946|Validate Stack Sequences|[Go]({{< relref "/ChapterFour/0946.Validate-Stack-Sequences.md" >}})|Medium| O(n)| O(n)||63.4%| +|0921|Minimum Add to Make Parentheses Valid|[Go]({{< relref "/ChapterFour/0921.Minimum-Add-to-Make-Parentheses-Valid.md" >}})|Medium| O(n)| O(n)||74.7%| +|0946|Validate Stack Sequences|[Go]({{< relref "/ChapterFour/0946.Validate-Stack-Sequences.md" >}})|Medium| O(n)| O(n)||63.5%| |1003|Check If Word Is Valid After Substitutions|[Go]({{< relref "/ChapterFour/1003.Check-If-Word-Is-Valid-After-Substitutions.md" >}})|Medium| O(n)| O(1)||56.2%| |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.2%| |1021|Remove Outermost Parentheses|[Go]({{< relref "/ChapterFour/1021.Remove-Outermost-Parentheses.md" >}})|Easy| O(n)| O(1)||78.7%| |1047|Remove All Adjacent Duplicates In String|[Go]({{< relref "/ChapterFour/1047.Remove-All-Adjacent-Duplicates-In-String.md" >}})|Easy| O(n)| O(1)||70.3%| -|1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||44.4%| +|1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||45.1%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index 9593b1b3..fb3c056e 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -11,7 +11,7 @@ type: docs |0003|Longest Substring Without Repeating Characters|[Go]({{< relref "/ChapterFour/0003.Longest-Substring-Without-Repeating-Characters.md" >}})|Medium| O(n)| O(1)|❤️|31.3%| |0013|Roman to Integer|[Go]({{< relref "/ChapterFour/0013.Roman-to-Integer.md" >}})|Easy||||56.4%| |0017|Letter Combinations of a Phone Number|[Go]({{< relref "/ChapterFour/0017.Letter-Combinations-of-a-Phone-Number.md" >}})|Medium| O(log n)| O(1)||48.7%| -|0020|Valid Parentheses|[Go]({{< relref "/ChapterFour/0020.Valid-Parentheses.md" >}})|Easy| O(log n)| O(1)||39.7%| +|0020|Valid Parentheses|[Go]({{< relref "/ChapterFour/0020.Valid-Parentheses.md" >}})|Easy| O(log n)| O(1)||39.8%| |0022|Generate Parentheses|[Go]({{< relref "/ChapterFour/0022.Generate-Parentheses.md" >}})|Medium| O(log n)| O(1)||64.9%| |0028|Implement strStr()|[Go]({{< relref "/ChapterFour/0028.Implement-strStr.md" >}})|Easy| O(n)| O(1)||35.1%| |0030|Substring with Concatenation of All Words|[Go]({{< relref "/ChapterFour/0030.Substring-with-Concatenation-of-All-Words.md" >}})|Hard| O(n)| O(n)|❤️|26.1%| @@ -22,7 +22,7 @@ type: docs |0091|Decode Ways|[Go]({{< relref "/ChapterFour/0091.Decode-Ways.md" >}})|Medium| O(n)| O(n)||26.3%| |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|37.3%| |0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.0%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.4%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.5%| |0151|Reverse Words in a String|[Go]({{< relref "/ChapterFour/0151.Reverse-Words-in-a-String.md" >}})|Medium||||23.4%| |0344|Reverse String|[Go]({{< relref "/ChapterFour/0344.Reverse-String.md" >}})|Easy| O(n)| O(1)||70.0%| |0345|Reverse Vowels of a String|[Go]({{< relref "/ChapterFour/0345.Reverse-Vowels-of-a-String.md" >}})|Easy| O(n)| O(1)||44.9%| @@ -41,16 +41,16 @@ type: docs |1108|Defanging an IP Address|[Go]({{< relref "/ChapterFour/1108.Defanging-an-IP-Address.md" >}})|Easy||||88.5%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||59.5%| |1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||61.7%| -|1221|Split a String in Balanced Strings|[Go]({{< relref "/ChapterFour/1221.Split-a-String-in-Balanced-Strings.md" >}})|Easy||||84.0%| +|1221|Split a String in Balanced Strings|[Go]({{< relref "/ChapterFour/1221.Split-a-String-in-Balanced-Strings.md" >}})|Easy||||84.1%| |1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.4%| |1455|Check If a Word Occurs As a Prefix of Any Word in a Sentence|[Go]({{< relref "/ChapterFour/1455.Check-If-a-Word-Occurs-As-a-Prefix-of-Any-Word-in-a-Sentence.md" >}})|Easy||||64.7%| |1573|Number of Ways to Split a String|[Go]({{< relref "/ChapterFour/1573.Number-of-Ways-to-Split-a-String.md" >}})|Medium||||30.9%| |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||50.1%| |1662|Check If Two String Arrays are Equivalent|[Go]({{< relref "/ChapterFour/1662.Check-If-Two-String-Arrays-are-Equivalent.md" >}})|Easy||||83.5%| -|1668|Maximum Repeating Substring|[Go]({{< relref "/ChapterFour/1668.Maximum-Repeating-Substring.md" >}})|Easy||||38.7%| +|1668|Maximum Repeating Substring|[Go]({{< relref "/ChapterFour/1668.Maximum-Repeating-Substring.md" >}})|Easy||||38.6%| |1678|Goal Parser Interpretation|[Go]({{< relref "/ChapterFour/1678.Goal-Parser-Interpretation.md" >}})|Easy||||86.4%| |1684|Count the Number of Consistent Strings|[Go]({{< relref "/ChapterFour/1684.Count-the-Number-of-Consistent-Strings.md" >}})|Easy||||84.0%| -|1694|Reformat Phone Number|[Go]({{< relref "/ChapterFour/1694.Reformat-Phone-Number.md" >}})|Easy||||67.0%| +|1694|Reformat Phone Number|[Go]({{< relref "/ChapterFour/1694.Reformat-Phone-Number.md" >}})|Easy||||66.9%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index 190fb429..c419de3f 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -34,7 +34,7 @@ type: docs |0173|Binary Search Tree Iterator|[Go]({{< relref "/ChapterFour/0173.Binary-Search-Tree-Iterator.md" >}})|Medium| O(n)| O(1)||59.7%| |0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||55.8%| |0222|Count Complete Tree Nodes|[Go]({{< relref "/ChapterFour/0222.Count-Complete-Tree-Nodes.md" >}})|Medium| O(n)| O(1)||48.9%| -|0226|Invert Binary Tree|[Go]({{< relref "/ChapterFour/0226.Invert-Binary-Tree.md" >}})|Easy| O(n)| O(1)||66.6%| +|0226|Invert Binary Tree|[Go]({{< relref "/ChapterFour/0226.Invert-Binary-Tree.md" >}})|Easy| O(n)| O(1)||66.7%| |0230|Kth Smallest Element in a BST|[Go]({{< relref "/ChapterFour/0230.Kth-Smallest-Element-in-a-BST.md" >}})|Medium| O(n)| O(1)||62.2%| |0235|Lowest Common Ancestor of a Binary Search Tree|[Go]({{< relref "/ChapterFour/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||51.4%| |0236|Lowest Common Ancestor of a Binary Tree|[Go]({{< relref "/ChapterFour/0236.Lowest-Common-Ancestor-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||48.2%| @@ -43,24 +43,24 @@ type: docs |0404|Sum of Left Leaves|[Go]({{< relref "/ChapterFour/0404.Sum-of-Left-Leaves.md" >}})|Easy| O(n)| O(1)||52.2%| |0437|Path Sum III|[Go]({{< relref "/ChapterFour/0437.Path-Sum-III.md" >}})|Medium| O(n)| O(1)||48.0%| |0508|Most Frequent Subtree Sum|[Go]({{< relref "/ChapterFour/0508.Most-Frequent-Subtree-Sum.md" >}})|Medium||||58.9%| -|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.4%| +|0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.3%| |0515|Find Largest Value in Each Tree Row|[Go]({{< relref "/ChapterFour/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}})|Medium| O(n)| O(n)||62.0%| |0563|Binary Tree Tilt|[Go]({{< relref "/ChapterFour/0563.Binary-Tree-Tilt.md" >}})|Easy||||52.7%| |0572|Subtree of Another Tree|[Go]({{< relref "/ChapterFour/0572.Subtree-of-Another-Tree.md" >}})|Easy||||44.4%| -|0637|Average of Levels in Binary Tree|[Go]({{< relref "/ChapterFour/0637.Average-of-Levels-in-Binary-Tree.md" >}})|Easy| O(n)| O(n)||64.5%| +|0637|Average of Levels in Binary Tree|[Go]({{< relref "/ChapterFour/0637.Average-of-Levels-in-Binary-Tree.md" >}})|Easy| O(n)| O(n)||64.6%| |0653|Two Sum IV - Input is a BST|[Go]({{< relref "/ChapterFour/0653.Two-Sum-IV---Input-is-a-BST.md" >}})|Easy||||56.2%| |0662|Maximum Width of Binary Tree|[Go]({{< relref "/ChapterFour/0662.Maximum-Width-of-Binary-Tree.md" >}})|Medium||||40.0%| |0684|Redundant Connection|[Go]({{< relref "/ChapterFour/0684.Redundant-Connection.md" >}})|Medium||||58.8%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0685.Redundant-Connection-II.md" >}})|Hard||||32.9%| |0834|Sum of Distances in Tree|[Go]({{< relref "/ChapterFour/0834.Sum-of-Distances-in-Tree.md" >}})|Hard||||45.6%| |0863|All Nodes Distance K in Binary Tree|[Go]({{< relref "/ChapterFour/0863.All-Nodes-Distance-K-in-Binary-Tree.md" >}})|Medium||||57.5%| -|0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.5%| +|0872|Leaf-Similar Trees|[Go]({{< relref "/ChapterFour/0872.Leaf-Similar-Trees.md" >}})|Easy||||64.6%| |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.4%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0968.Binary-Tree-Cameras.md" >}})|Hard||||38.5%| |0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||69.5%| |0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |1026|Maximum Difference Between Node and Ancestor|[Go]({{< relref "/ChapterFour/1026.Maximum-Difference-Between-Node-and-Ancestor.md" >}})|Medium||||69.2%| -|1028|Recover a Tree From Preorder Traversal|[Go]({{< relref "/ChapterFour/1028.Recover-a-Tree-From-Preorder-Traversal.md" >}})|Hard||||70.7%| +|1028|Recover a Tree From Preorder Traversal|[Go]({{< relref "/ChapterFour/1028.Recover-a-Tree-From-Preorder-Traversal.md" >}})|Hard||||70.8%| |1110|Delete Nodes And Return Forest|[Go]({{< relref "/ChapterFour/1110.Delete-Nodes-And-Return-Forest.md" >}})|Medium||||67.6%| |1123|Lowest Common Ancestor of Deepest Leaves|[Go]({{< relref "/ChapterFour/1123.Lowest-Common-Ancestor-of-Deepest-Leaves.md" >}})|Medium||||67.9%| |1145|Binary Tree Coloring Game|[Go]({{< relref "/ChapterFour/1145.Binary-Tree-Coloring-Game.md" >}})|Medium||||51.4%| diff --git a/website/content/ChapterTwo/Union_Find.md b/website/content/ChapterTwo/Union_Find.md index b193c3f4..4ca0269f 100644 --- a/website/content/ChapterTwo/Union_Find.md +++ b/website/content/ChapterTwo/Union_Find.md @@ -21,7 +21,7 @@ type: docs |0128|Longest Consecutive Sequence|[Go]({{< relref "/ChapterFour/0128.Longest-Consecutive-Sequence.md" >}})|Hard| O(n)| O(n)|❤️|46.1%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0130.Surrounded-Regions.md" >}})|Medium| O(m\*n)| O(m\*n)||29.2%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200.Number-of-Islands.md" >}})|Medium| O(m\*n)| O(m\*n)||48.7%| -|0399|Evaluate Division|[Go]({{< relref "/ChapterFour/0399.Evaluate-Division.md" >}})|Medium| O(n)| O(n)||54.0%| +|0399|Evaluate Division|[Go]({{< relref "/ChapterFour/0399.Evaluate-Division.md" >}})|Medium| O(n)| O(n)||54.1%| |0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0547.Number-of-Provinces.md" >}})|Medium| O(n^2)| O(n)||60.2%| |0684|Redundant Connection|[Go]({{< relref "/ChapterFour/0684.Redundant-Connection.md" >}})|Medium| O(n)| O(n)||58.8%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0685.Redundant-Connection-II.md" >}})|Hard| O(n)| O(n)||32.9%| @@ -37,6 +37,7 @@ type: docs |0959|Regions Cut By Slashes|[Go]({{< relref "/ChapterFour/0959.Regions-Cut-By-Slashes.md" >}})|Medium| O(n^2)| O(n^2)|❤️|66.9%| |0990|Satisfiability of Equality Equations|[Go]({{< relref "/ChapterFour/0990.Satisfiability-of-Equality-Equations.md" >}})|Medium| O(n)| O(n)||46.5%| |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1202.Smallest-String-With-Swaps.md" >}})|Medium||||48.5%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||54.9%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/menu/index.md b/website/content/menu/index.md index 172c3d6f..a4bb5db1 100644 --- a/website/content/menu/index.md +++ b/website/content/menu/index.md @@ -553,6 +553,7 @@ headless: true - [1306.Jump-Game-III]({{< relref "/ChapterFour/1306.Jump-Game-III.md" >}}) - [1313.Decompress-Run-Length-Encoded-List]({{< relref "/ChapterFour/1313.Decompress-Run-Length-Encoded-List.md" >}}) - [1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers]({{< relref "/ChapterFour/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md" >}}) + - [1319.Number-of-Operations-to-Make-Network-Connected]({{< relref "/ChapterFour/1319.Number-of-Operations-to-Make-Network-Connected.md" >}}) - [1380.Lucky-Numbers-in-a-Matrix]({{< relref "/ChapterFour/1380.Lucky-Numbers-in-a-Matrix.md" >}}) - [1385.Find-the-Distance-Value-Between-Two-Arrays]({{< relref "/ChapterFour/1385.Find-the-Distance-Value-Between-Two-Arrays.md" >}}) - [1389.Create-Target-Array-in-the-Given-Order]({{< relref "/ChapterFour/1389.Create-Target-Array-in-the-Given-Order.md" >}})