diff --git a/README.md b/README.md index 97e559e3..5a9f1227 100755 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ |0003|Longest Substring Without Repeating Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0003.Longest-Substring-Without-Repeating-Characters)|31.6%|Medium|| |0004|Median of Two Sorted Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0004.Median-of-Two-Sorted-Arrays)|31.5%|Hard|| |0005|Longest Palindromic Substring|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0005.Longest-Palindromic-Substring)|30.7%|Medium|| -|0006|ZigZag Conversion|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0006.ZigZag-Conversion)|38.3%|Medium|| +|0006|ZigZag Conversion|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0006.ZigZag-Conversion)|38.4%|Medium|| |0007|Reverse Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0007.Reverse-Integer)|26.0%|Easy|| |0008|String to Integer (atoi)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0008.String-to-Integer-(atoi))|15.7%|Medium|| |0009|Palindrome Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0009.Palindrome-Number)|50.1%|Easy|| @@ -161,9 +161,9 @@ |0020|Valid Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0020.Valid-Parentheses)|40.0%|Easy|| |0021|Merge Two Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0021.Merge-Two-Sorted-Lists)|56.5%|Easy|| |0022|Generate Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0022.Generate-Parentheses)|65.9%|Medium|| -|0023|Merge k Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0023.Merge-k-Sorted-Lists)|43.1%|Hard|| +|0023|Merge k Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0023.Merge-k-Sorted-Lists)|43.2%|Hard|| |0024|Swap Nodes in Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0024.Swap-Nodes-in-Pairs)|53.7%|Medium|| -|0025|Reverse Nodes in k-Group|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0025.Reverse-Nodes-in-k-Group)|45.5%|Hard|| +|0025|Reverse Nodes in k-Group|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0025.Reverse-Nodes-in-k-Group)|45.6%|Hard|| |0026|Remove Duplicates from Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0026.Remove-Duplicates-from-Sorted-Array)|46.9%|Easy|| |0027|Remove Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0027.Remove-Element)|49.5%|Easy|| |0028|Implement strStr()|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0028.Implement-strStr())|35.4%|Easy|| @@ -179,7 +179,7 @@ |0038|Count and Say||46.3%|Medium|| |0039|Combination Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0039.Combination-Sum)|59.9%|Medium|| |0040|Combination Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0040.Combination-Sum-II)|50.5%|Medium|| -|0041|First Missing Positive|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0041.First-Missing-Positive)|34.0%|Hard|| +|0041|First Missing Positive|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0041.First-Missing-Positive)|34.1%|Hard|| |0042|Trapping Rain Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0042.Trapping-Rain-Water)|51.7%|Hard|| |0043|Multiply Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0043.Multiply-Strings)|35.2%|Medium|| |0044|Wildcard Matching||25.6%|Hard|| @@ -241,7 +241,7 @@ |0100|Same Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0100.Same-Tree)|54.3%|Easy|| |0101|Symmetric Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0101.Symmetric-Tree)|48.6%|Easy|| |0102|Binary Tree Level Order Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0102.Binary-Tree-Level-Order-Traversal)|57.1%|Medium|| -|0103|Binary Tree Zigzag Level Order Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0103.Binary-Tree-Zigzag-Level-Order-Traversal)|50.5%|Medium|| +|0103|Binary Tree Zigzag Level Order Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0103.Binary-Tree-Zigzag-Level-Order-Traversal)|50.6%|Medium|| |0104|Maximum Depth of Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0104.Maximum-Depth-of-Binary-Tree)|68.5%|Easy|| |0105|Construct Binary Tree from Preorder and Inorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal)|52.6%|Medium|| |0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal)|50.3%|Medium|| @@ -251,27 +251,27 @@ |0110|Balanced Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0110.Balanced-Binary-Tree)|44.9%|Easy|| |0111|Minimum Depth of Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0111.Minimum-Depth-of-Binary-Tree)|39.9%|Easy|| |0112|Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0112.Path-Sum)|42.7%|Easy|| -|0113|Path Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0113.Path-Sum-II)|49.6%|Medium|| +|0113|Path Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0113.Path-Sum-II)|49.7%|Medium|| |0114|Flatten Binary Tree to Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0114.Flatten-Binary-Tree-to-Linked-List)|52.6%|Medium|| |0115|Distinct Subsequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0115.Distinct-Subsequences)|40.1%|Hard|| |0116|Populating Next Right Pointers in Each Node||49.8%|Medium|| |0117|Populating Next Right Pointers in Each Node II||42.5%|Medium|| |0118|Pascal's Triangle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0118.Pascal's-Triangle)|55.7%|Easy|| -|0119|Pascal's Triangle II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0119.Pascal's-Triangle-II)|52.6%|Easy|| +|0119|Pascal's Triangle II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0119.Pascal's-Triangle-II)|52.7%|Easy|| |0120|Triangle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0120.Triangle)|46.9%|Medium|| |0121|Best Time to Buy and Sell Stock|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0121.Best-Time-to-Buy-and-Sell-Stock)|51.9%|Easy|| |0122|Best Time to Buy and Sell Stock II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0122.Best-Time-to-Buy-and-Sell-Stock-II)|58.9%|Easy|| |0123|Best Time to Buy and Sell Stock III||40.2%|Hard|| |0124|Binary Tree Maximum Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0124.Binary-Tree-Maximum-Path-Sum)|35.7%|Hard|| |0125|Valid Palindrome|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0125.Valid-Palindrome)|38.6%|Easy|| -|0126|Word Ladder II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0126.Word-Ladder-II)|23.8%|Hard|| +|0126|Word Ladder II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0126.Word-Ladder-II)|23.9%|Hard|| |0127|Word Ladder|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0127.Word-Ladder)|32.3%|Hard|| |0128|Longest Consecutive Sequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0128.Longest-Consecutive-Sequence)|46.6%|Hard|| |0129|Sum Root to Leaf Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0129.Sum-Root-to-Leaf-Numbers)|51.4%|Medium|| |0130|Surrounded Regions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0130.Surrounded-Regions)|29.9%|Medium|| |0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|52.8%|Medium|| |0132|Palindrome Partitioning II||31.4%|Hard|| -|0133|Clone Graph||40.0%|Medium|| +|0133|Clone Graph||40.1%|Medium|| |0134|Gas Station||41.7%|Medium|| |0135|Candy||33.4%|Hard|| |0136|Single Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0136.Single-Number)|66.8%|Easy|| @@ -282,7 +282,7 @@ |0141|Linked List Cycle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0141.Linked-List-Cycle)|43.2%|Easy|| |0142|Linked List Cycle II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0142.Linked-List-Cycle-II)|40.1%|Medium|| |0143|Reorder List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0143.Reorder-List)|41.2%|Medium|| -|0144|Binary Tree Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0144.Binary-Tree-Preorder-Traversal)|57.9%|Medium|| +|0144|Binary Tree Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0144.Binary-Tree-Preorder-Traversal)|58.0%|Medium|| |0145|Binary Tree Postorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0145.Binary-Tree-Postorder-Traversal)|58.2%|Medium|| |0146|LRU Cache|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0146.LRU-Cache)|36.4%|Medium|| |0147|Insertion Sort List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0147.Insertion-Sort-List)|44.7%|Medium|| @@ -319,14 +319,14 @@ |0178|Rank Scores||51.3%|Medium|| |0179|Largest Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0179.Largest-Number)|30.9%|Medium|| |0180|Consecutive Numbers||42.7%|Medium|| -|0181|Employees Earning More Than Their Managers||61.2%|Easy|| +|0181|Employees Earning More Than Their Managers||61.3%|Easy|| |0182|Duplicate Emails||65.2%|Easy|| |0183|Customers Who Never Order||57.7%|Easy|| |0184|Department Highest Salary||41.1%|Medium|| |0185|Department Top Three Salaries||40.1%|Hard|| -|0186|Reverse Words in a String II||46.1%|Medium|| +|0186|Reverse Words in a String II||46.2%|Medium|| |0187|Repeated DNA Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0187.Repeated-DNA-Sequences)|41.7%|Medium|| -|0188|Best Time to Buy and Sell Stock IV||30.1%|Hard|| +|0188|Best Time to Buy and Sell Stock IV||30.2%|Hard|| |0189|Rotate Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0189.Rotate-Array)|36.8%|Medium|| |0190|Reverse Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0190.Reverse-Bits)|42.8%|Easy|| |0191|Number of 1 Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0191.Number-of-1-Bits)|54.4%|Easy|| @@ -337,12 +337,12 @@ |0196|Delete Duplicate Emails||46.2%|Easy|| |0197|Rising Temperature||40.3%|Easy|| |0198|House Robber|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0198.House-Robber)|43.2%|Medium|| -|0199|Binary Tree Right Side View|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0199.Binary-Tree-Right-Side-View)|56.6%|Medium|| +|0199|Binary Tree Right Side View|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0199.Binary-Tree-Right-Side-View)|56.7%|Medium|| |0200|Number of Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0200.Number-of-Islands)|49.7%|Medium|| |0201|Bitwise AND of Numbers Range|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0201.Bitwise-AND-of-Numbers-Range)|39.7%|Medium|| |0202|Happy Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0202.Happy-Number)|51.4%|Easy|| |0203|Remove Linked List Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0203.Remove-Linked-List-Elements)|39.6%|Easy|| -|0204|Count Primes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0204.Count-Primes)|32.3%|Easy|| +|0204|Count Primes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0204.Count-Primes)|32.4%|Easy|| |0205|Isomorphic Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0205.Isomorphic-Strings)|40.7%|Easy|| |0206|Reverse Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0206.Reverse-Linked-List)|65.9%|Easy|| |0207|Course Schedule|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0207.Course-Schedule)|44.3%|Medium|| @@ -374,7 +374,7 @@ |0233|Number of Digit One||31.9%|Hard|| |0234|Palindrome Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0234.Palindrome-Linked-List)|42.2%|Easy|| |0235|Lowest Common Ancestor of a Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree)|52.2%|Easy|| -|0236|Lowest Common Ancestor of a Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0236.Lowest-Common-Ancestor-of-a-Binary-Tree)|49.5%|Medium|| +|0236|Lowest Common Ancestor of a Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0236.Lowest-Common-Ancestor-of-a-Binary-Tree)|49.6%|Medium|| |0237|Delete Node in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0237.Delete-Node-in-a-Linked-List)|67.6%|Easy|| |0238|Product of Array Except Self||61.4%|Medium|| |0239|Sliding Window Maximum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0239.Sliding-Window-Maximum)|44.8%|Hard|| @@ -388,7 +388,7 @@ |0247|Strobogrammatic Number II||48.9%|Medium|| |0248|Strobogrammatic Number III||40.4%|Hard|| |0249|Group Shifted Strings||58.6%|Medium|| -|0250|Count Univalue Subtrees||53.5%|Medium|| +|0250|Count Univalue Subtrees||53.6%|Medium|| |0251|Flatten 2D Vector||46.5%|Medium|| |0252|Meeting Rooms||55.6%|Easy|| |0253|Meeting Rooms II||47.2%|Medium|| @@ -403,7 +403,7 @@ |0262|Trips and Users||35.7%|Hard|| |0263|Ugly Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0263.Ugly-Number)|41.7%|Easy|| |0264|Ugly Number II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0264.Ugly-Number-II)|43.0%|Medium|| -|0265|Paint House II||46.0%|Hard|| +|0265|Paint House II||46.1%|Hard|| |0266|Palindrome Permutation||62.9%|Easy|| |0267|Palindrome Permutation II||37.7%|Medium|| |0268|Missing Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0268.Missing-Number)|55.4%|Easy|| @@ -415,7 +415,7 @@ |0274|H-Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0274.H-Index)|36.5%|Medium|| |0275|H-Index II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0275.H-Index-II)|36.4%|Medium|| |0276|Paint Fence||39.3%|Medium|| -|0277|Find the Celebrity||44.1%|Medium|| +|0277|Find the Celebrity||44.2%|Medium|| |0278|First Bad Version||37.9%|Easy|| |0279|Perfect Squares||49.3%|Medium|| |0280|Wiggle Sort||64.8%|Medium|| @@ -454,14 +454,14 @@ |0313|Super Ugly Number||46.4%|Medium|| |0314|Binary Tree Vertical Order Traversal||47.4%|Medium|| |0315|Count of Smaller Numbers After Self|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0315.Count-of-Smaller-Numbers-After-Self)|42.4%|Hard|| -|0316|Remove Duplicate Letters||39.4%|Medium|| +|0316|Remove Duplicate Letters||39.5%|Medium|| |0317|Shortest Distance from All Buildings||43.0%|Hard|| |0318|Maximum Product of Word Lengths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0318.Maximum-Product-of-Word-Lengths)|52.5%|Medium|| |0319|Bulb Switcher||45.5%|Medium|| |0320|Generalized Abbreviation||54.1%|Medium|| |0321|Create Maximum Number||27.6%|Hard|| |0322|Coin Change|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0322.Coin-Change)|37.8%|Medium|| -|0323|Number of Connected Components in an Undirected Graph||58.3%|Medium|| +|0323|Number of Connected Components in an Undirected Graph||58.4%|Medium|| |0324|Wiggle Sort II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0324.Wiggle-Sort-II)|30.9%|Medium|| |0325|Maximum Size Subarray Sum Equals k||47.6%|Medium|| |0326|Power of Three|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0326.Power-of-Three)|42.1%|Easy|| @@ -479,7 +479,7 @@ |0338|Counting Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0338.Counting-Bits)|70.6%|Medium|| |0339|Nested List Weight Sum||77.0%|Medium|| |0340|Longest Substring with At Most K Distinct Characters||45.8%|Medium|| -|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|56.0%|Medium|| +|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|55.9%|Medium|| |0342|Power of Four|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0342.Power-of-Four)|41.9%|Easy|| |0343|Integer Break|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0343.Integer-Break)|51.4%|Medium|| |0344|Reverse String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0344.Reverse-String)|70.8%|Easy|| @@ -497,7 +497,7 @@ |0356|Line Reflection||33.1%|Medium|| |0357|Count Numbers with Unique Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0357.Count-Numbers-with-Unique-Digits)|49.0%|Medium|| |0358|Rearrange String k Distance Apart||35.8%|Hard|| -|0359|Logger Rate Limiter||72.6%|Easy|| +|0359|Logger Rate Limiter||72.7%|Easy|| |0360|Sort Transformed Array||50.0%|Medium|| |0361|Bomb Enemy||47.0%|Medium|| |0362|Design Hit Counter||65.6%|Medium|| @@ -522,7 +522,7 @@ |0381|Insert Delete GetRandom O(1) - Duplicates allowed||35.0%|Hard|| |0382|Linked List Random Node||54.3%|Medium|| |0383|Ransom Note||53.5%|Easy|| -|0384|Shuffle an Array||54.1%|Medium|| +|0384|Shuffle an Array||54.2%|Medium|| |0385|Mini Parser|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0385.Mini-Parser)|34.7%|Medium|| |0386|Lexicographical Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0386.Lexicographical-Numbers)|54.8%|Medium|| |0387|First Unique Character in a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0387.First-Unique-Character-in-a-String)|54.0%|Easy|| @@ -536,7 +536,7 @@ |0395|Longest Substring with At Least K Repeating Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0395.Longest-Substring-with-At-Least-K-Repeating-Characters)|43.7%|Medium|| |0396|Rotate Function||36.8%|Medium|| |0397|Integer Replacement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0397.Integer-Replacement)|33.6%|Medium|| -|0398|Random Pick Index||58.5%|Medium|| +|0398|Random Pick Index||58.6%|Medium|| |0399|Evaluate Division|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0399.Evaluate-Division)|54.7%|Medium|| |0400|Nth Digit||32.5%|Medium|| |0401|Binary Watch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0401.Binary-Watch)|48.6%|Easy|| @@ -550,7 +550,7 @@ |0409|Longest Palindrome|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0409.Longest-Palindrome)|52.3%|Easy|| |0410|Split Array Largest Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0410.Split-Array-Largest-Sum)|46.8%|Hard|| |0411|Minimum Unique Word Abbreviation||37.5%|Hard|| -|0412|Fizz Buzz|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0412.Fizz-Buzz)|63.7%|Easy|| +|0412|Fizz Buzz|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0412.Fizz-Buzz)|63.8%|Easy|| |0413|Arithmetic Slices|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0413.Arithmetic-Slices)|60.1%|Medium|| |0414|Third Maximum Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0414.Third-Maximum-Number)|30.8%|Easy|| |0415|Add Strings||48.6%|Easy|| @@ -560,7 +560,7 @@ |0419|Battleships in a Board||71.3%|Medium|| |0420|Strong Password Checker||13.9%|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)|54.4%|Medium|| -|0422|Valid Word Square||38.2%|Easy|| +|0422|Valid Word Square||38.3%|Easy|| |0423|Reconstruct Original Digits from English|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0423.Reconstruct-Original-Digits-from-English)|50.9%|Medium|| |0424|Longest Repeating Character Replacement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0424.Longest-Repeating-Character-Replacement)|48.5%|Medium|| |0425|Word Squares||50.4%|Hard|| @@ -585,7 +585,7 @@ |0444|Sequence Reconstruction||23.7%|Medium|| |0445|Add Two Numbers II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0445.Add-Two-Numbers-II)|56.6%|Medium|| |0446|Arithmetic Slices II - Subsequence||33.7%|Hard|| -|0447|Number of Boomerangs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0447.Number-of-Boomerangs)|52.5%|Medium|| +|0447|Number of Boomerangs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0447.Number-of-Boomerangs)|52.6%|Medium|| |0448|Find All Numbers Disappeared in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0448.Find-All-Numbers-Disappeared-in-an-Array)|56.2%|Easy|| |0449|Serialize and Deserialize BST||54.4%|Medium|| |0450|Delete Node in a BST||45.6%|Medium|| @@ -603,13 +603,13 @@ |0462|Minimum Moves to Equal Array Elements II||54.5%|Medium|| |0463|Island Perimeter|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0463.Island-Perimeter)|66.9%|Easy|| |0464|Can I Win||29.7%|Medium|| -|0465|Optimal Account Balancing||48.5%|Hard|| +|0465|Optimal Account Balancing||48.6%|Hard|| |0466|Count The Repetitions||28.7%|Hard|| |0467|Unique Substrings in Wraparound String||36.2%|Medium|| |0468|Validate IP Address||25.1%|Medium|| |0469|Convex Polygon||37.6%|Medium|| |0470|Implement Rand10() Using Rand7()|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0470.Implement-Rand10()-Using-Rand7())|46.1%|Medium|| -|0471|Encode String with Shortest Length||49.7%|Hard|| +|0471|Encode String with Shortest Length||49.8%|Hard|| |0472|Concatenated Words||43.6%|Hard|| |0473|Matchsticks to Square||38.3%|Medium|| |0474|Ones and Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0474.Ones-and-Zeroes)|43.6%|Medium|| @@ -629,7 +629,7 @@ |0488|Zuma Game||38.2%|Hard|| |0489|Robot Room Cleaner||73.1%|Hard|| |0490|The Maze||53.0%|Medium|| -|0491|Increasing Subsequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0491.Increasing-Subsequences)|47.8%|Medium|| +|0491|Increasing Subsequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0491.Increasing-Subsequences)|47.9%|Medium|| |0492|Construct the Rectangle||50.7%|Easy|| |0493|Reverse Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0493.Reverse-Pairs)|27.3%|Hard|| |0494|Target Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0494.Target-Sum)|45.6%|Medium|| @@ -662,10 +662,10 @@ |0521|Longest Uncommon Subsequence I||59.1%|Easy|| |0522|Longest Uncommon Subsequence II||34.3%|Medium|| |0523|Continuous Subarray Sum||24.9%|Medium|| -|0524|Longest Word in Dictionary through Deleting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0524.Longest-Word-in-Dictionary-through-Deleting)|50.1%|Medium|| +|0524|Longest Word in Dictionary through Deleting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0524.Longest-Word-in-Dictionary-through-Deleting)|50.2%|Medium|| |0525|Contiguous Array||43.6%|Medium|| |0526|Beautiful Arrangement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0526.Beautiful-Arrangement)|62.2%|Medium|| -|0527|Word Abbreviation||56.4%|Hard|| +|0527|Word Abbreviation||56.5%|Hard|| |0528|Random Pick with Weight|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0528.Random-Pick-with-Weight)|44.8%|Medium|| |0529|Minesweeper|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0529.Minesweeper)|61.6%|Medium|| |0530|Minimum Absolute Difference in BST|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0530.Minimum-Absolute-Difference-in-BST)|55.1%|Easy|| @@ -688,7 +688,7 @@ |0547|Number of Provinces|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0547.Number-of-Provinces)|60.8%|Medium|| |0548|Split Array with Equal Sum||48.4%|Medium|| |0549|Binary Tree Longest Consecutive Sequence II||47.3%|Medium|| -|0550|Game Play Analysis IV||45.7%|Medium|| +|0550|Game Play Analysis IV||45.8%|Medium|| |0551|Student Attendance Record I||46.2%|Easy|| |0552|Student Attendance Record II||37.8%|Hard|| |0553|Optimal Division||57.6%|Medium|| @@ -709,12 +709,12 @@ |0568|Maximum Vacation Days||41.8%|Hard|| |0569|Median Employee Salary||62.5%|Hard|| |0570|Managers with at Least 5 Direct Reports||66.9%|Medium|| -|0571|Find Median Given Frequency of Numbers||45.6%|Hard|| +|0571|Find Median Given Frequency of Numbers||45.7%|Hard|| |0572|Subtree of Another Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0572.Subtree-of-Another-Tree)|44.6%|Easy|| |0573|Squirrel Simulation||54.2%|Medium|| |0574|Winning Candidate||52.9%|Medium|| |0575|Distribute Candies|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0575.Distribute-Candies)|64.4%|Easy|| -|0576|Out of Boundary Paths||36.1%|Medium|| +|0576|Out of Boundary Paths||36.2%|Medium|| |0577|Employee Bonus||72.1%|Easy|| |0578|Get Highest Answer Rate Question||42.2%|Medium|| |0579|Find Cumulative Salary of an Employee||38.6%|Hard|| @@ -738,22 +738,22 @@ |0597|Friend Requests I: Overall Acceptance Rate||42.0%|Easy|| |0598|Range Addition II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0598.Range-Addition-II)|50.3%|Easy|| |0599|Minimum Index Sum of Two Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0599.Minimum-Index-Sum-of-Two-Lists)|52.0%|Easy|| -|0600|Non-negative Integers without Consecutive Ones||34.4%|Hard|| +|0600|Non-negative Integers without Consecutive Ones||34.3%|Hard|| |0601|Human Traffic of Stadium||46.0%|Hard|| |0602|Friend Requests II: Who Has the Most Friends||58.1%|Medium|| |0603|Consecutive Available Seats||66.3%|Easy|| |0604|Design Compressed String Iterator||38.3%|Easy|| |0605|Can Place Flowers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0605.Can-Place-Flowers)|31.7%|Easy|| |0606|Construct String from Binary Tree||55.8%|Easy|| -|0607|Sales Person||65.5%|Easy|| +|0607|Sales Person||65.6%|Easy|| |0608|Tree Node||70.1%|Medium|| -|0609|Find Duplicate File in System||61.2%|Medium|| +|0609|Find Duplicate File in System||61.3%|Medium|| |0610|Triangle Judgement||69.0%|Easy|| |0611|Valid Triangle Number||49.5%|Medium|| -|0612|Shortest Distance in a Plane||61.7%|Medium|| +|0612|Shortest Distance in a Plane||61.8%|Medium|| |0613|Shortest Distance in a Line||80.0%|Easy|| -|0614|Second Degree Follower||32.9%|Medium|| -|0615|Average Salary: Departments VS Company||53.2%|Hard|| +|0614|Second Degree Follower||33.0%|Medium|| +|0615|Average Salary: Departments VS Company||53.3%|Hard|| |0616|Add Bold Tag in String||45.0%|Medium|| |0617|Merge Two Binary Trees||75.6%|Easy|| |0618|Students Report By Geography||60.8%|Hard|| @@ -770,7 +770,7 @@ |0629|K Inverse Pairs Array||31.8%|Hard|| |0630|Course Schedule III||33.9%|Hard|| |0631|Design Excel Sum Formula||32.3%|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.6%|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.7%|Hard|| |0633|Sum of Square Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0633.Sum-of-Square-Numbers)|32.7%|Medium|| |0634|Find the Derangement of An Array||40.6%|Medium|| |0635|Design Log Storage System||60.2%|Medium|| @@ -829,7 +829,7 @@ |0688|Knight Probability in Chessboard||50.3%|Medium|| |0689|Maximum Sum of 3 Non-Overlapping Subarrays||47.4%|Hard|| |0690|Employee Importance||59.1%|Easy|| -|0691|Stickers to Spell Word||45.3%|Hard|| +|0691|Stickers to Spell Word||45.4%|Hard|| |0692|Top K Frequent Words||53.3%|Medium|| |0693|Binary Number with Alternating Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0693.Binary-Number-with-Alternating-Bits)|60.0%|Easy|| |0694|Number of Distinct Islands||58.2%|Medium|| @@ -859,7 +859,7 @@ |0718|Maximum Length of Repeated Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0718.Maximum-Length-of-Repeated-Subarray)|50.6%|Medium|| |0719|Find K-th Smallest Pair Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0719.Find-K-th-Smallest-Pair-Distance)|32.7%|Hard|| |0720|Longest Word in Dictionary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0720.Longest-Word-in-Dictionary)|49.6%|Easy|| -|0721|Accounts Merge|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0721.Accounts-Merge)|52.4%|Medium|| +|0721|Accounts Merge|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0721.Accounts-Merge)|52.5%|Medium|| |0722|Remove Comments||36.5%|Medium|| |0723|Candy Crush||73.2%|Medium|| |0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|46.3%|Easy|| @@ -869,7 +869,7 @@ |0728|Self Dividing Numbers||75.7%|Easy|| |0729|My Calendar I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0729.My-Calendar-I)|53.7%|Medium|| |0730|Count Different Palindromic Subsequences||43.5%|Hard|| -|0731|My Calendar II||51.0%|Medium|| +|0731|My Calendar II||51.1%|Medium|| |0732|My Calendar III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0732.My-Calendar-III)|62.5%|Hard|| |0733|Flood Fill|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0733.Flood-Fill)|56.0%|Easy|| |0734|Sentence Similarity||42.5%|Easy|| @@ -878,7 +878,7 @@ |0737|Sentence Similarity II||46.7%|Medium|| |0738|Monotone Increasing Digits||45.8%|Medium|| |0739|Daily Temperatures|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0739.Daily-Temperatures)|64.9%|Medium|| -|0740|Delete and Earn||50.1%|Medium|| +|0740|Delete and Earn||50.2%|Medium|| |0741|Cherry Pickup||35.2%|Hard|| |0742|Closest Leaf in a Binary Tree||44.6%|Medium|| |0743|Network Delay Time||45.8%|Medium|| @@ -887,11 +887,11 @@ |0746|Min Cost Climbing Stairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0746.Min-Cost-Climbing-Stairs)|51.2%|Easy|| |0747|Largest Number At Least Twice of Others||43.3%|Easy|| |0748|Shortest Completing Word|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0748.Shortest-Completing-Word)|57.7%|Easy|| -|0749|Contain Virus||48.4%|Hard|| +|0749|Contain Virus||48.5%|Hard|| |0750|Number Of Corner Rectangles||67.2%|Medium|| |0751|IP to CIDR||59.0%|Medium|| |0752|Open the Lock||53.0%|Medium|| -|0753|Cracking the Safe|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0753.Cracking-the-Safe)|52.6%|Hard|| +|0753|Cracking the Safe|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0753.Cracking-the-Safe)|52.7%|Hard|| |0754|Reach a Number||40.5%|Medium|| |0755|Pour Water||44.3%|Medium|| |0756|Pyramid Transition Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0756.Pyramid-Transition-Matrix)|55.7%|Medium|| @@ -910,23 +910,23 @@ |0769|Max Chunks To Make Sorted||56.0%|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)|87.0%|Easy|| -|0772|Basic Calculator III||44.2%|Hard|| +|0772|Basic Calculator III||44.3%|Hard|| |0773|Sliding Puzzle||61.3%|Hard|| |0774|Minimize Max Distance to Gas Station||48.8%|Hard|| |0775|Global and Local Inversions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0775.Global-and-Local-Inversions)|46.2%|Medium|| |0776|Split BST||56.7%|Medium|| |0777|Swap Adjacent in LR String||35.7%|Medium|| |0778|Swim in Rising Water|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0778.Swim-in-Rising-Water)|55.0%|Hard|| -|0779|K-th Symbol in Grammar||38.8%|Medium|| +|0779|K-th Symbol in Grammar||38.9%|Medium|| |0780|Reaching Points||30.5%|Hard|| |0781|Rabbits in Forest|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0781.Rabbits-in-Forest)|55.8%|Medium|| -|0782|Transform to Chessboard||47.0%|Hard|| +|0782|Transform to Chessboard||47.1%|Hard|| |0783|Minimum Distance Between BST Nodes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0783.Minimum-Distance-Between-BST-Nodes)|54.3%|Easy|| |0784|Letter Case Permutation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0784.Letter-Case-Permutation)|68.8%|Medium|| |0785|Is Graph Bipartite?|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0785.Is-Graph-Bipartite?)|48.8%|Medium|| |0786|K-th Smallest Prime Fraction|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0786.K-th-Smallest-Prime-Fraction)|43.6%|Hard|| |0787|Cheapest Flights Within K Stops||39.7%|Medium|| -|0788|Rotated Digits||57.5%|Easy|| +|0788|Rotated Digits||57.6%|Easy|| |0789|Escape The Ghosts||58.6%|Medium|| |0790|Domino and Tromino Tiling||40.3%|Medium|| |0791|Custom Sort String||65.9%|Medium|| @@ -991,7 +991,7 @@ |0850|Rectangle Area II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0850.Rectangle-Area-II)|48.5%|Hard|| |0851|Loud and Rich|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0851.Loud-and-Rich)|52.9%|Medium|| |0852|Peak Index in a Mountain Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0852.Peak-Index-in-a-Mountain-Array)|71.8%|Easy|| -|0853|Car Fleet|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0853.Car-Fleet)|44.5%|Medium|| +|0853|Car Fleet|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0853.Car-Fleet)|44.6%|Medium|| |0854|K-Similar Strings||38.8%|Hard|| |0855|Exam Room||43.5%|Medium|| |0856|Score of Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0856.Score-of-Parentheses)|64.9%|Medium|| @@ -1026,7 +1026,7 @@ |0885|Spiral Matrix III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0885.Spiral-Matrix-III)|71.1%|Medium|| |0886|Possible Bipartition||45.4%|Medium|| |0887|Super Egg Drop|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0887.Super-Egg-Drop)|27.0%|Hard|| -|0888|Fair Candy Swap|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0888.Fair-Candy-Swap)|59.1%|Easy|| +|0888|Fair Candy Swap|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0888.Fair-Candy-Swap)|59.2%|Easy|| |0889|Construct Binary Tree from Preorder and Postorder Traversal||68.0%|Medium|| |0890|Find and Replace Pattern||74.2%|Medium|| |0891|Sum of Subsequence Widths|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0891.Sum-of-Subsequence-Widths)|33.1%|Hard|| @@ -1085,7 +1085,7 @@ |0944|Delete Columns to Make Sorted||70.8%|Easy|| |0945|Minimum Increment to Make Array Unique||46.9%|Medium|| |0946|Validate Stack Sequences|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0946.Validate-Stack-Sequences)|64.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.6%|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.7%|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|| |0950|Reveal Cards In Increasing Order||75.6%|Medium|| @@ -1103,11 +1103,11 @@ |0962|Maximum Width Ramp||46.6%|Medium|| |0963|Minimum Area Rectangle II||52.3%|Medium|| |0964|Least Operators to Express Number||45.3%|Hard|| -|0965|Univalued Binary Tree||67.9%|Easy|| +|0965|Univalued Binary Tree||68.0%|Easy|| |0966|Vowel Spellchecker|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0966.Vowel-Spellchecker)|51.9%|Medium|| |0967|Numbers With Same Consecutive Differences||45.2%|Medium|| |0968|Binary Tree Cameras|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0968.Binary-Tree-Cameras)|39.0%|Hard|| -|0969|Pancake Sorting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0969.Pancake-Sorting)|68.9%|Medium|| +|0969|Pancake Sorting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0969.Pancake-Sorting)|68.8%|Medium|| |0970|Powerful Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0970.Powerful-Integers)|40.1%|Medium|| |0971|Flip Binary Tree To Match Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal)|50.1%|Medium|| |0972|Equal Rational Numbers||42.0%|Hard|| @@ -1117,7 +1117,7 @@ |0976|Largest Perimeter Triangle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0976.Largest-Perimeter-Triangle)|59.4%|Easy|| |0977|Squares of a Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0977.Squares-of-a-Sorted-Array)|71.8%|Easy|| |0978|Longest Turbulent Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0978.Longest-Turbulent-Subarray)|46.7%|Medium|| -|0979|Distribute Coins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0979.Distribute-Coins-in-Binary-Tree)|69.9%|Medium|| +|0979|Distribute Coins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0979.Distribute-Coins-in-Binary-Tree)|70.0%|Medium|| |0980|Unique Paths III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0980.Unique-Paths-III)|77.1%|Hard|| |0981|Time Based Key-Value Store|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0981.Time-Based-Key-Value-Store)|54.3%|Medium|| |0982|Triples with Bitwise AND Equal To Zero||56.4%|Hard|| @@ -1134,12 +1134,12 @@ |0993|Cousins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0993.Cousins-in-Binary-Tree)|52.3%|Easy|| |0994|Rotting Oranges||49.7%|Medium|| |0995|Minimum Number of K Consecutive Bit Flips|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0995.Minimum-Number-of-K-Consecutive-Bit-Flips)|50.1%|Hard|| -|0996|Number of Squareful Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0996.Number-of-Squareful-Arrays)|48.5%|Hard|| +|0996|Number of Squareful Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0996.Number-of-Squareful-Arrays)|48.6%|Hard|| |0997|Find the Town Judge||49.8%|Easy|| |0998|Maximum Binary Tree II||64.2%|Medium|| |0999|Available Captures for Rook|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0999.Available-Captures-for-Rook)|67.7%|Easy|| |1000|Minimum Cost to Merge Stones||40.6%|Hard|| -|1001|Grid Illumination||36.1%|Hard|| +|1001|Grid Illumination||36.0%|Hard|| |1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.6%|Easy|| |1003|Check If Word Is Valid After Substitutions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1003.Check-If-Word-Is-Valid-After-Substitutions)|56.7%|Medium|| |1004|Max Consecutive Ones III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1004.Max-Consecutive-Ones-III)|60.9%|Medium|| @@ -1148,7 +1148,7 @@ |1007|Minimum Domino Rotations For Equal Row||50.9%|Medium|| |1008|Construct Binary Search Tree from Preorder Traversal||78.8%|Medium|| |1009|Complement of Base 10 Integer||61.5%|Easy|| -|1010|Pairs of Songs With Total Durations Divisible by 60||50.7%|Medium|| +|1010|Pairs of Songs With Total Durations Divisible by 60||50.8%|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)|60.0%|Medium|| |1012|Numbers With Repeated Digits||37.9%|Hard|| |1013|Partition Array Into Three Parts With Equal Sum||47.9%|Easy|| @@ -1185,7 +1185,7 @@ |1044|Longest Duplicate Substring||31.3%|Hard|| |1045|Customers Who Bought All Products||68.3%|Medium|| |1046|Last Stone Weight||62.4%|Easy|| -|1047|Remove All Adjacent Duplicates In String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1047.Remove-All-Adjacent-Duplicates-In-String)|71.4%|Easy|| +|1047|Remove All Adjacent Duplicates In String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1047.Remove-All-Adjacent-Duplicates-In-String)|71.5%|Easy|| |1048|Longest String Chain||55.7%|Medium|| |1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|46.1%|Medium|| |1050|Actors and Directors Who Cooperated At Least Three Times||72.4%|Easy|| @@ -1202,7 +1202,7 @@ |1061|Lexicographically Smallest Equivalent String||66.9%|Medium|| |1062|Longest Repeating Substring||58.5%|Medium|| |1063|Number of Valid Subarrays||72.0%|Hard|| -|1064|Fixed Point||64.7%|Easy|| +|1064|Fixed Point||64.6%|Easy|| |1065|Index Pairs of a String||61.0%|Easy|| |1066|Campus Bikes II||54.3%|Medium|| |1067|Digit Count in Range||41.7%|Hard|| @@ -1215,13 +1215,13 @@ |1074|Number of Submatrices That Sum to Target|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1074.Number-of-Submatrices-That-Sum-to-Target)|64.9%|Hard|| |1075|Project Employees I||66.3%|Easy|| |1076|Project Employees II||52.8%|Easy|| -|1077|Project Employees III||78.1%|Medium|| +|1077|Project Employees III||78.2%|Medium|| |1078|Occurrences After Bigram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1078.Occurrences-After-Bigram)|65.0%|Easy|| |1079|Letter Tile Possibilities|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1079.Letter-Tile-Possibilities)|76.0%|Medium|| |1080|Insufficient Nodes in Root to Leaf Paths||50.1%|Medium|| |1081|Smallest Subsequence of Distinct Characters||53.6%|Medium|| |1082|Sales Analysis I||74.1%|Easy|| -|1083|Sales Analysis II||50.8%|Easy|| +|1083|Sales Analysis II||50.9%|Easy|| |1084|Sales Analysis III||54.6%|Easy|| |1085|Sum of Digits in the Minimum Number||75.2%|Easy|| |1086|High Five||77.2%|Easy|| @@ -1230,10 +1230,10 @@ |1089|Duplicate Zeros|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1089.Duplicate-Zeros)|51.5%|Easy|| |1090|Largest Values From Labels||60.1%|Medium|| |1091|Shortest Path in Binary Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1091.Shortest-Path-in-Binary-Matrix)|40.2%|Medium|| -|1092|Shortest Common Supersequence||53.2%|Hard|| +|1092|Shortest Common Supersequence||53.3%|Hard|| |1093|Statistics from a Large Sample|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1093.Statistics-from-a-Large-Sample)|48.6%|Medium|| |1094|Car Pooling||59.7%|Medium|| -|1095|Find in Mountain Array||36.2%|Hard|| +|1095|Find in Mountain Array||36.1%|Hard|| |1096|Brace Expansion II||62.7%|Hard|| |1097|Game Play Analysis V||57.0%|Hard|| |1098|Unpopular Books||45.5%|Medium|| @@ -1269,11 +1269,11 @@ |1128|Number of Equivalent Domino Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1128.Number-of-Equivalent-Domino-Pairs)|46.3%|Easy|| |1129|Shortest Path with Alternating Colors||40.5%|Medium|| |1130|Minimum Cost Tree From Leaf Values||67.3%|Medium|| -|1131|Maximum of Absolute Value Expression||51.5%|Medium|| +|1131|Maximum of Absolute Value Expression||51.4%|Medium|| |1132|Reported Posts II||34.6%|Medium|| |1133|Largest Unique Number||67.5%|Easy|| |1134|Armstrong Number||77.9%|Easy|| -|1135|Connecting Cities With Minimum Cost||59.8%|Medium|| +|1135|Connecting Cities With Minimum Cost||59.7%|Medium|| |1136|Parallel Courses||61.1%|Medium|| |1137|N-th Tribonacci Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1137.N-th-Tribonacci-Number)|55.8%|Easy|| |1138|Alphabet Board Path||51.4%|Medium|| @@ -1311,8 +1311,8 @@ |1170|Compare Strings by Frequency of the Smallest Character|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character)|60.4%|Medium|| |1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List)|41.6%|Medium|| |1172|Dinner Plate Stacks||37.5%|Hard|| -|1173|Immediate Food Delivery I||82.8%|Easy|| -|1174|Immediate Food Delivery II||62.3%|Medium|| +|1173|Immediate Food Delivery I||82.7%|Easy|| +|1174|Immediate Food Delivery II||62.2%|Medium|| |1175|Prime Arrangements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1175.Prime-Arrangements)|51.8%|Easy|| |1176|Diet Plan Performance||53.8%|Easy|| |1177|Can Make Palindrome from Substring||36.0%|Medium|| @@ -1320,17 +1320,17 @@ |1179|Reformat Department Table||82.1%|Easy|| |1180|Count Substrings with Only One Distinct Letter||78.0%|Easy|| |1181|Before and After Puzzle||44.6%|Medium|| -|1182|Shortest Distance to Target Color||53.6%|Medium|| -|1183|Maximum Number of Ones||57.9%|Hard|| -|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|53.8%|Easy|| +|1182|Shortest Distance to Target Color||53.7%|Medium|| +|1183|Maximum Number of Ones||58.0%|Hard|| +|1184|Distance Between Bus Stops|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1184.Distance-Between-Bus-Stops)|53.9%|Easy|| |1185|Day of the Week|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1185.Day-of-the-Week)|61.0%|Easy|| |1186|Maximum Subarray Sum with One Deletion||39.1%|Medium|| |1187|Make Array Strictly Increasing||42.3%|Hard|| |1188|Design Bounded Blocking Queue||73.1%|Medium|| -|1189|Maximum Number of Balloons|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1189.Maximum-Number-of-Balloons)|62.2%|Easy|| +|1189|Maximum Number of Balloons|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1189.Maximum-Number-of-Balloons)|62.3%|Easy|| |1190|Reverse Substrings Between Each Pair of Parentheses||64.3%|Medium|| -|1191|K-Concatenation Maximum Sum||25.0%|Medium|| -|1192|Critical Connections in a Network||50.5%|Hard|| +|1191|K-Concatenation Maximum Sum||24.9%|Medium|| +|1192|Critical Connections in a Network||51.1%|Hard|| |1193|Monthly Transactions I||69.0%|Medium|| |1194|Tournament Winners||52.5%|Hard|| |1195|Fizz Buzz Multithreaded||70.9%|Medium|| @@ -1360,20 +1360,20 @@ |1219|Path with Maximum Gold||66.0%|Medium|| |1220|Count Vowels Permutation||54.0%|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.3%|Easy|| -|1222|Queens That Can Attack the King||69.4%|Medium|| +|1222|Queens That Can Attack the King||69.5%|Medium|| |1223|Dice Roll Simulation||46.7%|Hard|| |1224|Maximum Equal Frequency||35.7%|Hard|| -|1225|Report Contiguous Dates||63.2%|Hard|| +|1225|Report Contiguous Dates||63.1%|Hard|| |1226|The Dining Philosophers||60.1%|Medium|| |1227|Airplane Seat Assignment Probability||62.3%|Medium|| |1228|Missing Number In Arithmetic Progression||51.6%|Easy|| |1229|Meeting Scheduler||54.4%|Medium|| |1230|Toss Strange Coins||50.5%|Medium|| |1231|Divide Chocolate||53.7%|Hard|| -|1232|Check If It Is a Straight Line|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1232.Check-If-It-Is-a-Straight-Line)|43.2%|Easy|| +|1232|Check If It Is a Straight Line|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1232.Check-If-It-Is-a-Straight-Line)|43.1%|Easy|| |1233|Remove Sub-Folders from the Filesystem||62.6%|Medium|| |1234|Replace the Substring for Balanced String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1234.Replace-the-Substring-for-Balanced-String)|34.6%|Medium|| -|1235|Maximum Profit in Job Scheduling|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1235.Maximum-Profit-in-Job-Scheduling)|47.8%|Hard|| +|1235|Maximum Profit in Job Scheduling|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1235.Maximum-Profit-in-Job-Scheduling)|47.7%|Hard|| |1236|Web Crawler||64.8%|Medium|| |1237|Find Positive Integer Solution for a Given Equation||70.2%|Medium|| |1238|Circular Permutation in Binary Representation||66.5%|Medium|| @@ -1381,7 +1381,7 @@ |1240|Tiling a Rectangle with the Fewest Squares||52.9%|Hard|| |1241|Number of Comments per Post||67.9%|Easy|| |1242|Web Crawler Multithreaded||47.8%|Medium|| -|1243|Array Transformation||50.0%|Easy|| +|1243|Array Transformation||50.1%|Easy|| |1244|Design A Leaderboard||66.7%|Medium|| |1245|Tree Diameter||61.3%|Medium|| |1246|Palindrome Removal||45.7%|Hard|| @@ -1400,7 +1400,7 @@ |1259|Handshakes That Don't Cross||54.2%|Hard|| |1260|Shift 2D Grid|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1260.Shift-2D-Grid)|61.8%|Easy|| |1261|Find Elements in a Contaminated Binary Tree||74.6%|Medium|| -|1262|Greatest Sum Divisible by Three||50.0%|Medium|| +|1262|Greatest Sum Divisible by Three||50.1%|Medium|| |1263|Minimum Moves to Move a Box to Their Target Location||43.7%|Hard|| |1264|Page Recommendations||69.2%|Medium|| |1265|Print Immutable Linked List in Reverse||94.2%|Medium|| @@ -1411,7 +1411,7 @@ |1270|All People Report to the Given Manager||88.2%|Medium|| |1271|Hexspeak||55.6%|Easy|| |1272|Remove Interval||58.6%|Medium|| -|1273|Delete Tree Nodes||62.0%|Medium|| +|1273|Delete Tree Nodes||61.9%|Medium|| |1274|Number of Ships in a Rectangle||65.9%|Hard|| |1275|Find Winner on a Tic Tac Toe Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1275.Find-Winner-on-a-Tic-Tac-Toe-Game)|52.9%|Easy|| |1276|Number of Burgers with No Waste of Ingredients||50.2%|Medium|| @@ -1425,7 +1425,7 @@ |1284|Minimum Number of Flips to Convert Binary Matrix to Zero Matrix||70.2%|Hard|| |1285|Find the Start and End Number of Continuous Ranges||87.4%|Medium|| |1286|Iterator for Combination||71.0%|Medium|| -|1287|Element Appearing More Than 25% In Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1287.Element-Appearing-More-Than-25%-In-Sorted-Array)|60.3%|Easy|| +|1287|Element Appearing More Than 25% In Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1287.Element-Appearing-More-Than-25%-In-Sorted-Array)|60.4%|Easy|| |1288|Remove Covered Intervals||57.5%|Medium|| |1289|Minimum Falling Path Sum II||62.6%|Hard|| |1290|Convert Binary Number in a Linked List to Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer)|81.7%|Easy|| @@ -1439,7 +1439,7 @@ |1298|Maximum Candies You Can Get from Boxes||59.9%|Hard|| |1299|Replace Elements with Greatest Element on Right Side|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1299.Replace-Elements-with-Greatest-Element-on-Right-Side)|74.6%|Easy|| |1300|Sum of Mutated Array Closest to Target|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1300.Sum-of-Mutated-Array-Closest-to-Target)|43.0%|Medium|| -|1301|Number of Paths with Max Score||38.2%|Hard|| +|1301|Number of Paths with Max Score||38.3%|Hard|| |1302|Deepest Leaves Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1302.Deepest-Leaves-Sum)|85.5%|Medium|| |1303|Find the Team Size||89.9%|Easy|| |1304|Find N Unique Integers Sum up to Zero|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1304.Find-N-Unique-Integers-Sum-up-to-Zero)|76.7%|Easy|| @@ -1457,7 +1457,7 @@ |1316|Distinct Echo Substrings||49.8%|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.9%|Easy|| |1318|Minimum Flips to Make a OR b Equal to c||63.9%|Medium|| -|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)|55.6%|Medium|| +|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)|55.5%|Medium|| |1320|Minimum Distance to Type a Word Using Two Fingers||61.7%|Hard|| |1321|Restaurant Growth||71.8%|Medium|| |1322|Ads Performance||58.4%|Easy|| @@ -1466,7 +1466,7 @@ |1325|Delete Leaves With a Given Value||73.8%|Medium|| |1326|Minimum Number of Taps to Open to Water a Garden||47.5%|Hard|| |1327|List the Products Ordered in a Period||77.7%|Easy|| -|1328|Break a Palindrome||48.0%|Medium|| +|1328|Break a Palindrome||48.1%|Medium|| |1329|Sort the Matrix Diagonally|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1329.Sort-the-Matrix-Diagonally)|81.6%|Medium|| |1330|Reverse Subarray To Maximize Array Value||36.9%|Hard|| |1331|Rank Transform of an Array||57.3%|Easy|| @@ -1474,11 +1474,11 @@ |1333|Filter Restaurants by Vegan-Friendly, Price and Distance||57.5%|Medium|| |1334|Find the City With the Smallest Number of Neighbors at a Threshold Distance||47.3%|Medium|| |1335|Minimum Difficulty of a Job Schedule||56.5%|Hard|| -|1336|Number of Transactions per Visit||49.3%|Hard|| +|1336|Number of Transactions per Visit||49.4%|Hard|| |1337|The K Weakest Rows in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1337.The-K-Weakest-Rows-in-a-Matrix)|72.1%|Easy|| |1338|Reduce Array Size to The Half||67.7%|Medium|| |1339|Maximum Product of Splitted Binary Tree||38.6%|Medium|| -|1340|Jump Game V||59.3%|Hard|| +|1340|Jump Game V||59.4%|Hard|| |1341|Movie Rating||59.0%|Medium|| |1342|Number of Steps to Reduce a Number to Zero||85.6%|Easy|| |1343|Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold||65.1%|Medium|| @@ -1488,7 +1488,7 @@ |1347|Minimum Number of Steps to Make Two Strings Anagram||75.1%|Medium|| |1348|Tweet Counts Per Frequency||37.4%|Medium|| |1349|Maximum Students Taking Exam||44.4%|Hard|| -|1350|Students With Invalid Departments||90.5%|Easy|| +|1350|Students With Invalid Departments||90.4%|Easy|| |1351|Count Negative Numbers in a Sorted Matrix||75.8%|Easy|| |1352|Product of the Last K Numbers||45.2%|Medium|| |1353|Maximum Number of Events That Can Be Attended||30.5%|Medium|| @@ -1497,8 +1497,8 @@ |1356|Sort Integers by The Number of 1 Bits||70.5%|Easy|| |1357|Apply Discount Every n Orders||67.0%|Medium|| |1358|Number of Substrings Containing All Three Characters||60.6%|Medium|| -|1359|Count All Valid Pickup and Delivery Options||55.9%|Hard|| -|1360|Number of Days Between Two Dates||46.6%|Easy|| +|1359|Count All Valid Pickup and Delivery Options||56.0%|Hard|| +|1360|Number of Days Between Two Dates||46.5%|Easy|| |1361|Validate Binary Tree Nodes||43.2%|Medium|| |1362|Closest Divisors||57.9%|Medium|| |1363|Largest Multiple of Three||34.2%|Hard|| @@ -1521,10 +1521,10 @@ |1380|Lucky Numbers in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1380.Lucky-Numbers-in-a-Matrix)|70.4%|Easy|| |1381|Design a Stack With Increment Operation||76.4%|Medium|| |1382|Balance a Binary Search Tree||76.2%|Medium|| -|1383|Maximum Performance of a Team||36.0%|Hard|| +|1383|Maximum Performance of a Team||36.1%|Hard|| |1384|Total Sales Amount by Year||65.3%|Hard|| |1385|Find the Distance Value Between Two Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1385.Find-the-Distance-Value-Between-Two-Arrays)|66.5%|Easy|| -|1386|Cinema Seat Allocation||36.1%|Medium|| +|1386|Cinema Seat Allocation||36.2%|Medium|| |1387|Sort Integers by The Power Value||70.6%|Medium|| |1388|Pizza With 3n Slices||46.3%|Hard|| |1389|Create Target Array in the Given Order|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1389.Create-Target-Array-in-the-Given-Order)|84.9%|Easy|| @@ -1538,7 +1538,7 @@ |1397|Find All Good Strings||38.8%|Hard|| |1398|Customers Who Bought Products A and B but Not C||82.3%|Medium|| |1399|Count Largest Group||65.4%|Easy|| -|1400|Construct K Palindrome Strings||63.0%|Medium|| +|1400|Construct K Palindrome Strings||63.1%|Medium|| |1401|Circle and Rectangle Overlapping||42.6%|Medium|| |1402|Reducing Dishes||72.0%|Hard|| |1403|Minimum Subsequence in Non-Increasing Order||71.9%|Easy|| @@ -1547,20 +1547,20 @@ |1406|Stone Game III||58.1%|Hard|| |1407|Top Travellers||84.0%|Easy|| |1408|String Matching in an Array||63.7%|Easy|| -|1409|Queries on a Permutation With Key||81.9%|Medium|| +|1409|Queries on a Permutation With Key||82.0%|Medium|| |1410|HTML Entity Parser||54.1%|Medium|| -|1411|Number of Ways to Paint N × 3 Grid||60.6%|Hard|| +|1411|Number of Ways to Paint N × 3 Grid||60.5%|Hard|| |1412|Find the Quiet Students in All Exams||63.9%|Hard|| |1413|Minimum Value to Get Positive Step by Step Sum||65.4%|Easy|| |1414|Find the Minimum Number of Fibonacci Numbers Whose Sum Is K||63.1%|Medium|| |1415|The k-th Lexicographical String of All Happy Strings of Length n||70.0%|Medium|| |1416|Restore The Array||36.7%|Hard|| -|1417|Reformat The String||56.7%|Easy|| +|1417|Reformat The String||56.6%|Easy|| |1418|Display Table of Food Orders in a Restaurant||69.4%|Medium|| |1419|Minimum Number of Frogs Croaking||47.8%|Medium|| |1420|Build Array Where You Can Find The Maximum Exactly K Comparisons||64.2%|Hard|| |1421|NPV Queries||82.2%|Medium|| -|1422|Maximum Score After Splitting a String||57.5%|Easy|| +|1422|Maximum Score After Splitting a String||57.6%|Easy|| |1423|Maximum Points You Can Obtain from Cards|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1423.Maximum-Points-You-Can-Obtain-from-Cards)|47.0%|Medium|| |1424|Diagonal Traverse II||46.4%|Medium|| |1425|Constrained Subsequence Sum||44.9%|Hard|| @@ -1573,33 +1573,33 @@ |1432|Max Difference You Can Get From Changing an Integer||42.8%|Medium|| |1433|Check If a String Can Break Another String||67.4%|Medium|| |1434|Number of Ways to Wear Different Hats to Each Other||39.5%|Hard|| -|1435|Create a Session Bar Chart||78.0%|Easy|| +|1435|Create a Session Bar Chart||78.1%|Easy|| |1436|Destination City||77.3%|Easy|| |1437|Check If All 1's Are at Least Length K Places Away|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1437.Check-If-All-1's-Are-at-Least-Length-K-Places-Away)|61.8%|Easy|| -|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit)|44.4%|Medium|| +|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit)|44.5%|Medium|| |1439|Find the Kth Smallest Sum of a Matrix With Sorted Rows|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1439.Find-the-Kth-Smallest-Sum-of-a-Matrix-With-Sorted-Rows)|60.4%|Hard|| |1440|Evaluate Boolean Expression||75.0%|Medium|| |1441|Build an Array With Stack Operations||70.4%|Easy|| -|1442|Count Triplets That Can Form Two Arrays of Equal XOR||71.9%|Medium|| +|1442|Count Triplets That Can Form Two Arrays of Equal XOR||72.0%|Medium|| |1443|Minimum Time to Collect All Apples in a Tree||54.4%|Medium|| |1444|Number of Ways of Cutting a Pizza||54.0%|Hard|| |1445|Apples & Oranges||91.1%|Medium|| |1446|Consecutive Characters||61.3%|Easy|| |1447|Simplified Fractions||62.2%|Medium|| |1448|Count Good Nodes in Binary Tree||71.6%|Medium|| -|1449|Form Largest Integer With Digits That Add up to Target||44.5%|Hard|| +|1449|Form Largest Integer With Digits That Add up to Target||44.4%|Hard|| |1450|Number of Students Doing Homework at a Given Time||77.0%|Easy|| |1451|Rearrange Words in a Sentence||60.0%|Medium|| |1452|People Whose List of Favorite Companies Is Not a Subset of Another List||55.2%|Medium|| |1453|Maximum Number of Darts Inside of a Circular Dartboard||35.7%|Hard|| -|1454|Active Users||38.9%|Medium|| +|1454|Active Users||38.8%|Medium|| |1455|Check If a Word Occurs As a Prefix of Any Word in a Sentence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1455.Check-If-a-Word-Occurs-As-a-Prefix-of-Any-Word-in-a-Sentence)|65.4%|Easy|| |1456|Maximum Number of Vowels in a Substring of Given Length||55.1%|Medium|| |1457|Pseudo-Palindromic Paths in a Binary Tree||69.8%|Medium|| |1458|Max Dot Product of Two Subsequences||43.5%|Hard|| |1459|Rectangles Area||65.7%|Medium|| |1460|Make Two Arrays Equal by Reversing Sub-arrays||72.2%|Easy|| -|1461|Check If a String Contains All Binary Codes of Size K|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K)|54.2%|Medium|| +|1461|Check If a String Contains All Binary Codes of Size K|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K)|54.3%|Medium|| |1462|Course Schedule IV||44.8%|Medium|| |1463|Cherry Pickup II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1463.Cherry-Pickup-II)|68.8%|Hard|| |1464|Maximum Product of Two Elements in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1464.Maximum-Product-of-Two-Elements-in-an-Array)|77.1%|Easy|| @@ -1607,7 +1607,7 @@ |1466|Reorder Routes to Make All Paths Lead to the City Zero||62.0%|Medium|| |1467|Probability of a Two Boxes Having The Same Number of Distinct Balls||60.6%|Hard|| |1468|Calculate Salaries||82.0%|Medium|| -|1469|Find All The Lonely Nodes||80.6%|Easy|| +|1469|Find All The Lonely Nodes||80.5%|Easy|| |1470|Shuffle the Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1470.Shuffle-the-Array)|88.1%|Easy|| |1471|The k Strongest Values in an Array||58.5%|Medium|| |1472|Design Browser History||72.2%|Medium|| @@ -1618,7 +1618,7 @@ |1477|Find Two Non-overlapping Sub-arrays Each With Target Sum||35.2%|Medium|| |1478|Allocate Mailboxes||53.8%|Hard|| |1479|Sales by Day of the Week||83.1%|Hard|| -|1480|Running Sum of 1d Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1480.Running-Sum-of-1d-Array)|88.6%|Easy|| +|1480|Running Sum of 1d Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1480.Running-Sum-of-1d-Array)|88.5%|Easy|| |1481|Least Number of Unique Integers after K Removals||55.9%|Medium|| |1482|Minimum Number of Days to Make m Bouquets||51.0%|Medium|| |1483|Kth Ancestor of a Tree Node||31.9%|Hard|| @@ -1628,10 +1628,10 @@ |1487|Making File Names Unique||31.5%|Medium|| |1488|Avoid Flood in The City||24.6%|Medium|| |1489|Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree||51.5%|Hard|| -|1490|Clone N-ary Tree||83.2%|Medium|| +|1490|Clone N-ary Tree||83.3%|Medium|| |1491|Average Salary Excluding the Minimum and Maximum Salary||68.5%|Easy|| |1492|The kth Factor of n||63.1%|Medium|| -|1493|Longest Subarray of 1's After Deleting One Element||57.6%|Medium|| +|1493|Longest Subarray of 1's After Deleting One Element||57.7%|Medium|| |1494|Parallel Courses II||31.1%|Hard|| |1495|Friendly Movies Streamed Last Month||51.2%|Easy|| |1496|Path Crossing||55.3%|Easy|| @@ -1652,25 +1652,25 @@ |1511|Customer Order Frequency||74.4%|Easy|| |1512|Number of Good Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1512.Number-of-Good-Pairs)|87.6%|Easy|| |1513|Number of Substrings With Only 1s||42.1%|Medium|| -|1514|Path with Maximum Probability||41.1%|Medium|| +|1514|Path with Maximum Probability||41.2%|Medium|| |1515|Best Position for a Service Centre||38.5%|Hard|| |1516|Move Sub-Tree of N-Ary Tree||64.4%|Hard|| -|1517|Find Users With Valid E-Mails||71.0%|Easy|| +|1517|Find Users With Valid E-Mails||70.9%|Easy|| |1518|Water Bottles||60.5%|Easy|| |1519|Number of Nodes in the Sub-Tree With the Same Label||37.4%|Medium|| |1520|Maximum Number of Non-Overlapping Substrings||36.6%|Hard|| -|1521|Find a Value of a Mysterious Function Closest to Target||44.3%|Hard|| +|1521|Find a Value of a Mysterious Function Closest to Target||44.2%|Hard|| |1522|Diameter of N-Ary Tree||69.3%|Medium|| |1523|Count Odd Numbers in an Interval Range||54.1%|Easy|| |1524|Number of Sub-arrays With Odd Sum||40.2%|Medium|| |1525|Number of Good Ways to Split a String||67.5%|Medium|| |1526|Minimum Number of Increments on Subarrays to Form a Target Array||61.7%|Hard|| -|1527|Patients With a Condition||61.9%|Easy|| +|1527|Patients With a Condition||61.8%|Easy|| |1528|Shuffle String||85.7%|Easy|| |1529|Bulb Switcher IV||70.9%|Medium|| |1530|Number of Good Leaf Nodes Pairs||56.7%|Medium|| |1531|String Compression II||34.1%|Hard|| -|1532|The Most Recent Three Orders||72.9%|Medium|| +|1532|The Most Recent Three Orders||72.8%|Medium|| |1533|Find the Index of the Large Integer||54.5%|Medium|| |1534|Count Good Triplets||80.3%|Easy|| |1535|Find the Winner of an Array Game||47.7%|Medium|| @@ -1695,7 +1695,7 @@ |1554|Strings Differ by One Character||64.2%|Medium|| |1555|Bank Account Summary||53.0%|Medium|| |1556|Thousand Separator||57.1%|Easy|| -|1557|Minimum Number of Vertices to Reach All Nodes||75.9%|Medium|| +|1557|Minimum Number of Vertices to Reach All Nodes||75.8%|Medium|| |1558|Minimum Numbers of Function Calls to Make Target Array||63.3%|Medium|| |1559|Detect Cycles in 2D Grid||44.7%|Hard|| |1560|Most Visited Sector in a Circular Track||56.9%|Easy|| @@ -1703,7 +1703,7 @@ |1562|Find Latest Group of Size M||39.7%|Medium|| |1563|Stone Game V||39.9%|Hard|| |1564|Put Boxes Into the Warehouse I||65.6%|Medium|| -|1565|Unique Orders and Customers Per Month||83.0%|Easy|| +|1565|Unique Orders and Customers Per Month||82.9%|Easy|| |1566|Detect Pattern of Length M Repeated K or More Times||42.6%|Easy|| |1567|Maximum Length of Subarray With Positive Product||37.0%|Medium|| |1568|Minimum Number of Days to Disconnect Island||50.1%|Hard|| @@ -1716,7 +1716,7 @@ |1575|Count All Possible Routes||57.1%|Hard|| |1576|Replace All ?'s to Avoid Consecutive Repeating Characters||50.1%|Easy|| |1577|Number of Ways Where Square of Number Is Equal to Product of Two Numbers||37.9%|Medium|| -|1578|Minimum Deletion Cost to Avoid Repeating Letters||60.6%|Medium|| +|1578|Minimum Deletion Cost to Avoid Repeating Letters||60.7%|Medium|| |1579|Remove Max Number of Edges to Keep Graph Fully Traversable|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1579.Remove-Max-Number-of-Edges-to-Keep-Graph-Fully-Traversable)|46.4%|Hard|| |1580|Put Boxes Into the Warehouse II||61.8%|Medium|| |1581|Customer Who Visited but Did Not Make Any Transactions||89.6%|Easy|| @@ -1730,7 +1730,7 @@ |1589|Maximum Sum Obtained of Any Permutation||35.0%|Medium|| |1590|Make Sum Divisible by P||26.9%|Medium|| |1591|Strange Printer II||55.6%|Hard|| -|1592|Rearrange Spaces Between Words||43.5%|Easy|| +|1592|Rearrange Spaces Between Words||43.6%|Easy|| |1593|Split a String Into the Max Number of Unique Substrings||50.0%|Medium|| |1594|Maximum Non Negative Product in a Matrix||32.4%|Medium|| |1595|Minimum Cost to Connect Two Groups of Points||43.6%|Hard|| @@ -1738,7 +1738,7 @@ |1597|Build Binary Expression Tree From Infix Expression||59.2%|Hard|| |1598|Crawler Log Folder||63.8%|Easy|| |1599|Maximum Profit of Operating a Centennial Wheel||43.7%|Medium|| -|1600|Throne Inheritance||60.6%|Medium|| +|1600|Throne Inheritance||60.7%|Medium|| |1601|Maximum Number of Achievable Transfer Requests||48.0%|Hard|| |1602|Find Nearest Right Node in Binary Tree||73.4%|Medium|| |1603|Design Parking System|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1603.Design-Parking-System)|86.3%|Easy|| @@ -1756,17 +1756,17 @@ |1615|Maximal Network Rank||53.1%|Medium|| |1616|Split Two Strings to Make Palindrome||36.1%|Medium|| |1617|Count Subtrees With Max Distance Between Cities||63.3%|Hard|| -|1618|Maximum Font to Fit a Sentence in a Screen||57.2%|Medium|| +|1618|Maximum Font to Fit a Sentence in a Screen||57.3%|Medium|| |1619|Mean of Array After Removing Some Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1619.Mean-of-Array-After-Removing-Some-Elements)|64.5%|Easy|| |1620|Coordinate With Maximum Network Quality||37.2%|Medium|| |1621|Number of Sets of K Non-Overlapping Line Segments||41.6%|Medium|| -|1622|Fancy Sequence||14.9%|Hard|| +|1622|Fancy Sequence||14.8%|Hard|| |1623|All Valid Triplets That Can Represent a Country||89.1%|Easy|| |1624|Largest Substring Between Two Equal Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1624.Largest-Substring-Between-Two-Equal-Characters)|58.5%|Easy|| |1625|Lexicographically Smallest String After Applying Operations||64.4%|Medium|| |1626|Best Team With No Conflicts||38.6%|Medium|| -|1627|Graph Connectivity With Threshold||40.5%|Hard|| -|1628|Design an Expression Tree With Evaluate Function||80.1%|Medium|| +|1627|Graph Connectivity With Threshold||40.4%|Hard|| +|1628|Design an Expression Tree With Evaluate Function||80.2%|Medium|| |1629|Slowest Key|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1629.Slowest-Key)|59.1%|Easy|| |1630|Arithmetic Subarrays||77.6%|Medium|| |1631|Path With Minimum Effort|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1631.Path-With-Minimum-Effort)|50.0%|Medium|| @@ -1775,21 +1775,21 @@ |1634|Add Two Polynomials Represented as Linked Lists||53.9%|Medium|| |1635|Hopper Company Queries I||56.1%|Hard|| |1636|Sort Array by Increasing Frequency|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1636.Sort-Array-by-Increasing-Frequency)|67.0%|Easy|| -|1637|Widest Vertical Area Between Two Points Containing No Points||83.6%|Medium|| +|1637|Widest Vertical Area Between Two Points Containing No Points||83.7%|Medium|| |1638|Count Substrings That Differ by One Character||70.4%|Medium|| -|1639|Number of Ways to Form a Target String Given a Dictionary||40.0%|Hard|| +|1639|Number of Ways to Form a Target String Given a Dictionary||40.1%|Hard|| |1640|Check Array Formation Through Concatenation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1640.Check-Array-Formation-Through-Concatenation)|59.7%|Easy|| |1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|75.4%|Medium|| |1642|Furthest Building You Can Reach||49.8%|Medium|| |1643|Kth Smallest Instructions||44.9%|Hard|| |1644|Lowest Common Ancestor of a Binary Tree II||56.4%|Medium|| -|1645|Hopper Company Queries II||39.2%|Hard|| +|1645|Hopper Company Queries II||39.3%|Hard|| |1646|Get Maximum in Generated Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1646.Get-Maximum-in-Generated-Array)|53.1%|Easy|| |1647|Minimum Deletions to Make Character Frequencies Unique|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1647.Minimum-Deletions-to-Make-Character-Frequencies-Unique)|55.6%|Medium|| |1648|Sell Diminishing-Valued Colored Balls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1648.Sell-Diminishing-Valued-Colored-Balls)|30.8%|Medium|| |1649|Create Sorted Array through Instructions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1649.Create-Sorted-Array-through-Instructions)|36.7%|Hard|| |1650|Lowest Common Ancestor of a Binary Tree III||76.8%|Medium|| -|1651|Hopper Company Queries III||67.3%|Hard|| +|1651|Hopper Company Queries III||67.4%|Hard|| |1652|Defuse the Bomb|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1652.Defuse-the-Bomb)|61.6%|Easy|| |1653|Minimum Deletions to Make String Balanced|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1653.Minimum-Deletions-to-Make-String-Balanced)|51.8%|Medium|| |1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|25.0%|Medium|| @@ -1799,70 +1799,70 @@ |1658|Minimum Operations to Reduce X to Zero|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1658.Minimum-Operations-to-Reduce-X-to-Zero)|33.3%|Medium|| |1659|Maximize Grid Happiness|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1659.Maximize-Grid-Happiness)|35.6%|Hard|| |1660|Correct a Binary Tree||76.2%|Medium|| -|1661|Average Time of Process per Machine||79.6%|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)|82.5%|Easy|| |1663|Smallest String With A Given Numeric Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1663.Smallest-String-With-A-Given-Numeric-Value)|64.3%|Medium|| -|1664|Ways to Make a Fair Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1664.Ways-to-Make-a-Fair-Array)|62.2%|Medium|| -|1665|Minimum Initial Energy to Finish Tasks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1665.Minimum-Initial-Energy-to-Finish-Tasks)|64.7%|Hard|| +|1664|Ways to Make a Fair Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1664.Ways-to-Make-a-Fair-Array)|62.1%|Medium|| +|1665|Minimum Initial Energy to Finish Tasks|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1665.Minimum-Initial-Energy-to-Finish-Tasks)|64.8%|Hard|| |1666|Change the Root of a Binary Tree||68.9%|Medium|| |1667|Fix Names in a Table||62.7%|Easy|| |1668|Maximum Repeating Substring|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1668.Maximum-Repeating-Substring)|38.6%|Easy|| |1669|Merge In Between Linked Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1669.Merge-In-Between-Linked-Lists)|75.5%|Medium|| |1670|Design Front Middle Back Queue|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1670.Design-Front-Middle-Back-Queue)|54.1%|Medium|| -|1671|Minimum Number of Removals to Make Mountain Array||45.1%|Hard|| -|1672|Richest Customer Wealth|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1672.Richest-Customer-Wealth)|88.2%|Easy|| +|1671|Minimum Number of Removals to Make Mountain Array||45.0%|Hard|| +|1672|Richest Customer Wealth|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1672.Richest-Customer-Wealth)|88.1%|Easy|| |1673|Find the Most Competitive Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1673.Find-the-Most-Competitive-Subsequence)|45.5%|Medium|| |1674|Minimum Moves to Make Array Complementary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1674.Minimum-Moves-to-Make-Array-Complementary)|34.9%|Medium|| |1675|Minimize Deviation in Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1675.Minimize-Deviation-in-Array)|48.2%|Hard|| |1676|Lowest Common Ancestor of a Binary Tree IV||79.3%|Medium|| -|1677|Product's Worth Over Invoices||67.0%|Easy|| -|1678|Goal Parser Interpretation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1678.Goal-Parser-Interpretation)|85.2%|Easy|| +|1677|Product's Worth Over Invoices||66.8%|Easy|| +|1678|Goal Parser Interpretation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1678.Goal-Parser-Interpretation)|85.3%|Easy|| |1679|Max Number of K-Sum Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1679.Max-Number-of-K-Sum-Pairs)|53.7%|Medium|| |1680|Concatenation of Consecutive Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1680.Concatenation-of-Consecutive-Binary-Numbers)|52.3%|Medium|| |1681|Minimum Incompatibility|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1681.Minimum-Incompatibility)|35.9%|Hard|| |1682|Longest Palindromic Subsequence II||51.3%|Medium|| -|1683|Invalid Tweets||90.8%|Easy|| +|1683|Invalid Tweets||90.9%|Easy|| |1684|Count the Number of Consistent Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1684.Count-the-Number-of-Consistent-Strings)|81.7%|Easy|| |1685|Sum of Absolute Differences in a Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1685.Sum-of-Absolute-Differences-in-a-Sorted-Array)|63.2%|Medium|| |1686|Stone Game VI||50.1%|Medium|| |1687|Delivering Boxes from Storage to Ports||35.3%|Hard|| |1688|Count of Matches in Tournament|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1688.Count-of-Matches-in-Tournament)|81.4%|Easy|| |1689|Partitioning Into Minimum Number Of Deci-Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1689.Partitioning-Into-Minimum-Number-Of-Deci-Binary-Numbers)|87.1%|Medium|| -|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|49.2%|Medium|| +|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|49.1%|Medium|| |1691|Maximum Height by Stacking Cuboids|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1691.Maximum-Height-by-Stacking-Cuboids)|50.5%|Hard|| |1692|Count Ways to Distribute Candies||60.4%|Hard|| |1693|Daily Leads and Partners||91.0%|Easy|| |1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|65.0%|Easy|| |1695|Maximum Erasure Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1695.Maximum-Erasure-Value)|49.2%|Medium|| |1696|Jump Game VI|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1696.Jump-Game-VI)|51.2%|Medium|| -|1697|Checking Existence of Edge Length Limited Paths||53.9%|Hard|| -|1698|Number of Distinct Substrings in a String||60.4%|Medium|| +|1697|Checking Existence of Edge Length Limited Paths||54.0%|Hard|| +|1698|Number of Distinct Substrings in a String||60.5%|Medium|| |1699|Number of Calls Between Two Persons||87.0%|Medium|| |1700|Number of Students Unable to Eat Lunch|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1700.Number-of-Students-Unable-to-Eat-Lunch)|67.6%|Easy|| -|1701|Average Waiting Time||61.3%|Medium|| +|1701|Average Waiting Time||61.2%|Medium|| |1702|Maximum Binary String After Change||59.3%|Medium|| |1703|Minimum Adjacent Swaps for K Consecutive Ones||39.9%|Hard|| -|1704|Determine if String Halves Are Alike|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1704.Determine-if-String-Halves-Are-Alike)|79.1%|Easy|| +|1704|Determine if String Halves Are Alike|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1704.Determine-if-String-Halves-Are-Alike)|79.2%|Easy|| |1705|Maximum Number of Eaten Apples||41.7%|Medium|| -|1706|Where Will the Ball Fall||60.6%|Medium|| +|1706|Where Will the Ball Fall||60.7%|Medium|| |1707|Maximum XOR With an Element From Array||46.3%|Hard|| |1708|Largest Subarray Length K||63.1%|Easy|| |1709|Biggest Window Between Visits||82.5%|Medium|| |1710|Maximum Units on a Truck|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1710.Maximum-Units-on-a-Truck)|69.9%|Easy|| |1711|Count Good Meals||26.4%|Medium|| -|1712|Ways to Split Array Into Three Subarrays||29.2%|Medium|| +|1712|Ways to Split Array Into Three Subarrays||29.3%|Medium|| |1713|Minimum Operations to Make a Subsequence||45.6%|Hard|| |1714|Sum Of Special Evenly-Spaced Elements In Array||49.0%|Hard|| |1715|Count Apples and Oranges||79.0%|Medium|| |1716|Calculate Money in Leetcode Bank|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1716.Calculate-Money-in-Leetcode-Bank)|64.7%|Easy|| -|1717|Maximum Score From Removing Substrings||41.1%|Medium|| +|1717|Maximum Score From Removing Substrings||41.2%|Medium|| |1718|Construct the Lexicographically Largest Valid Sequence||47.0%|Medium|| |1719|Number Of Ways To Reconstruct A Tree||39.0%|Hard|| |1720|Decode XORed Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1720.Decode-XORed-Array)|85.2%|Easy|| |1721|Swapping Nodes in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1721.Swapping-Nodes-in-a-Linked-List)|67.3%|Medium|| |1722|Minimize Hamming Distance After Swap Operations||54.3%|Medium|| |1723|Find Minimum Time to Finish All Jobs||43.8%|Hard|| -|1724|Checking Existence of Edge Length Limited Paths II||58.1%|Hard|| +|1724|Checking Existence of Edge Length Limited Paths II||57.7%|Hard|| |1725|Number Of Rectangles That Can Form The Largest Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1725.Number-Of-Rectangles-That-Can-Form-The-Largest-Square)|78.1%|Easy|| |1726|Tuple with Same Product||57.1%|Medium|| |1727|Largest Submatrix With Rearrangements||58.8%|Medium|| @@ -1878,102 +1878,102 @@ |1737|Change Minimum Characters to Satisfy One of Three Conditions||30.1%|Medium|| |1738|Find Kth Largest XOR Coordinate Value||62.5%|Medium|| |1739|Building Boxes||49.5%|Hard|| -|1740|Find Distance in a Binary Tree||67.8%|Medium|| +|1740|Find Distance in a Binary Tree||67.7%|Medium|| |1741|Find Total Time Spent by Each Employee||91.1%|Easy|| |1742|Maximum Number of Balls in a Box|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1742.Maximum-Number-of-Balls-in-a-Box)|73.6%|Easy|| -|1743|Restore the Array From Adjacent Pairs||63.5%|Medium|| -|1744|Can You Eat Your Favorite Candy on Your Favorite Day?||30.8%|Medium|| +|1743|Restore the Array From Adjacent Pairs||63.6%|Medium|| +|1744|Can You Eat Your Favorite Candy on Your Favorite Day?||30.7%|Medium|| |1745|Palindrome Partitioning IV||49.4%|Hard|| -|1746|Maximum Subarray Sum After One Operation||62.1%|Medium|| +|1746|Maximum Subarray Sum After One Operation||62.0%|Medium|| |1747|Leetflex Banned Accounts||68.8%|Medium|| |1748|Sum of Unique Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1748.Sum-of-Unique-Elements)|74.7%|Easy|| |1749|Maximum Absolute Sum of Any Subarray||52.7%|Medium|| |1750|Minimum Length of String After Deleting Similar Ends||42.3%|Medium|| -|1751|Maximum Number of Events That Can Be Attended II||48.4%|Hard|| +|1751|Maximum Number of Events That Can Be Attended II||48.5%|Hard|| |1752|Check if Array Is Sorted and Rotated|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1752.Check-if-Array-Is-Sorted-and-Rotated)|60.2%|Easy|| |1753|Maximum Score From Removing Stones||61.9%|Medium|| |1754|Largest Merge Of Two Strings||40.9%|Medium|| |1755|Closest Subsequence Sum||35.8%|Hard|| -|1756|Design Most Recently Used Queue||77.6%|Medium|| -|1757|Recyclable and Low Fat Products||95.6%|Easy|| +|1756|Design Most Recently Used Queue||77.7%|Medium|| +|1757|Recyclable and Low Fat Products||95.7%|Easy|| |1758|Minimum Changes To Make Alternating Binary String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1758.Minimum-Changes-To-Make-Alternating-Binary-String)|58.1%|Easy|| |1759|Count Number of Homogenous Substrings||42.9%|Medium|| |1760|Minimum Limit of Balls in a Bag||53.1%|Medium|| |1761|Minimum Degree of a Connected Trio in a Graph||37.5%|Hard|| -|1762|Buildings With an Ocean View||81.1%|Medium|| +|1762|Buildings With an Ocean View||81.2%|Medium|| |1763|Longest Nice Substring||61.3%|Easy|| |1764|Form Array by Concatenating Subarrays of Another Array||54.4%|Medium|| |1765|Map of Highest Peak||55.3%|Medium|| |1766|Tree of Coprimes||36.7%|Hard|| -|1767|Find the Subtasks That Did Not Execute||86.7%|Hard|| +|1767|Find the Subtasks That Did Not Execute||86.3%|Hard|| |1768|Merge Strings Alternately||75.3%|Easy|| |1769|Minimum Number of Operations to Move All Balls to Each Box||86.5%|Medium|| |1770|Maximum Score from Performing Multiplication Operations||29.7%|Medium|| |1771|Maximize Palindrome Length From Subsequences||34.1%|Hard|| -|1772|Sort Features by Popularity||65.1%|Medium|| +|1772|Sort Features by Popularity||65.2%|Medium|| |1773|Count Items Matching a Rule||84.8%|Easy|| |1774|Closest Dessert Cost||57.7%|Medium|| -|1775|Equal Sum Arrays With Minimum Number of Operations||50.5%|Medium|| +|1775|Equal Sum Arrays With Minimum Number of Operations||50.6%|Medium|| |1776|Car Fleet II||47.5%|Hard|| -|1777|Product's Price for Each Store||87.7%|Easy|| -|1778|Shortest Path in a Hidden Grid||46.3%|Medium|| -|1779|Find Nearest Point That Has the Same X or Y Coordinate||66.8%|Easy|| +|1777|Product's Price for Each Store||87.5%|Easy|| +|1778|Shortest Path in a Hidden Grid||45.9%|Medium|| +|1779|Find Nearest Point That Has the Same X or Y Coordinate||66.9%|Easy|| |1780|Check if Number is a Sum of Powers of Three||63.1%|Medium|| -|1781|Sum of Beauty of All Substrings||58.4%|Medium|| -|1782|Count Pairs Of Nodes||33.0%|Hard|| -|1783|Grand Slam Titles||90.6%|Medium|| +|1781|Sum of Beauty of All Substrings||58.2%|Medium|| +|1782|Count Pairs Of Nodes||33.1%|Hard|| +|1783|Grand Slam Titles||90.7%|Medium|| |1784|Check if Binary String Has at Most One Segment of Ones||41.6%|Easy|| |1785|Minimum Elements to Add to Form a Given Sum||39.4%|Medium|| |1786|Number of Restricted Paths From First to Last Node||36.1%|Medium|| |1787|Make the XOR of All Segments Equal to Zero||36.8%|Hard|| |1788|Maximize the Beauty of the Garden||68.1%|Hard|| -|1789|Primary Department for Each Employee||78.7%|Easy|| +|1789|Primary Department for Each Employee||78.9%|Easy|| |1790|Check if One String Swap Can Make Strings Equal||59.1%|Easy|| |1791|Find Center of Star Graph||84.4%|Medium|| -|1792|Maximum Average Pass Ratio||56.0%|Medium|| -|1793|Maximum Score of a Good Subarray||46.6%|Hard|| +|1792|Maximum Average Pass Ratio||55.9%|Medium|| +|1793|Maximum Score of a Good Subarray||46.7%|Hard|| |1794|Count Pairs of Equal Substrings With Minimum Difference||68.4%|Medium|| -|1795|Rearrange Products Table||90.7%|Easy|| +|1795|Rearrange Products Table||90.8%|Easy|| |1796|Second Largest Digit in a String||48.0%|Easy|| |1797|Design Authentication Manager||49.1%|Medium|| |1798|Maximum Number of Consecutive Values You Can Make||44.8%|Medium|| |1799|Maximize Score After N Operations||49.9%|Hard|| |1800|Maximum Ascending Subarray Sum||65.3%|Easy|| |1801|Number of Orders in the Backlog||43.8%|Medium|| -|1802|Maximum Value at a Given Index in a Bounded Array||27.7%|Medium|| -|1803|Count Pairs With XOR in a Range||43.7%|Hard|| -|1804|Implement Trie II (Prefix Tree)||59.1%|Medium|| -|1805|Number of Different Integers in a String||48.0%|Easy|| -|1806|Minimum Number of Operations to Reinitialize a Permutation||70.4%|Medium|| -|1807|Evaluate the Bracket Pairs of a String||66.6%|Medium|| +|1802|Maximum Value at a Given Index in a Bounded Array||27.6%|Medium|| +|1803|Count Pairs With XOR in a Range||43.6%|Hard|| +|1804|Implement Trie II (Prefix Tree)||59.6%|Medium|| +|1805|Number of Different Integers in a String||47.9%|Easy|| +|1806|Minimum Number of Operations to Reinitialize a Permutation||70.5%|Medium|| +|1807|Evaluate the Bracket Pairs of a String||66.5%|Medium|| |1808|Maximize Number of Nice Divisors||27.7%|Hard|| -|1809|Ad-Free Sessions||66.7%|Easy|| -|1810|Minimum Path Cost in a Hidden Grid||55.0%|Medium|| -|1811|Find Interview Candidates||71.1%|Medium|| -|1812|Determine Color of a Chessboard Square||78.3%|Easy|| +|1809|Ad-Free Sessions||66.8%|Easy|| +|1810|Minimum Path Cost in a Hidden Grid||55.4%|Medium|| +|1811|Find Interview Candidates||71.2%|Medium|| +|1812|Determine Color of a Chessboard Square||78.2%|Easy|| |1813|Sentence Similarity III||43.8%|Medium|| |1814|Count Nice Pairs in an Array||38.3%|Medium|| |1815|Maximum Number of Groups Getting Fresh Donuts||38.9%|Hard|| |1816|Truncate Sentence||78.8%|Easy|| |1817|Finding the Users Active Minutes||78.6%|Medium|| |1818|Minimum Absolute Sum Difference||42.1%|Medium|| -|1819|Number of Different Subsequences GCDs||32.8%|Hard|| -|1820|Maximum Number of Accepted Invitations||50.2%|Medium|| -|1821|Find Customers With Positive Revenue this Year||89.4%|Easy|| -|1822|Sign of the Product of an Array||82.2%|Easy|| +|1819|Number of Different Subsequences GCDs||32.9%|Hard|| +|1820|Maximum Number of Accepted Invitations||49.9%|Medium|| +|1821|Find Customers With Positive Revenue this Year||89.3%|Easy|| +|1822|Sign of the Product of an Array||81.9%|Easy|| |1823|Find the Winner of the Circular Game||72.0%|Medium|| -|1824|Minimum Sideway Jumps||59.8%|Medium|| +|1824|Minimum Sideway Jumps||59.7%|Medium|| |1825|Finding MK Average||31.3%|Hard|| |1826|Faulty Sensor||60.1%|Easy|| |1827|Minimum Operations to Make the Array Increasing||79.2%|Easy|| -|1828|Queries on Number of Points Inside a Circle||88.2%|Medium|| -|1829|Maximum XOR for Each Query||72.1%|Medium|| -|1830|Minimum Number of Operations to Make String Sorted||45.5%|Hard|| -|1831|Maximum Transaction Each Day||87.4%|Medium|| +|1828|Queries on Number of Points Inside a Circle||88.1%|Medium|| +|1829|Maximum XOR for Each Query||72.3%|Medium|| +|1830|Minimum Number of Operations to Make String Sorted||45.7%|Hard|| +|1831|Maximum Transaction Each Day||88.0%|Medium|| |1832|Check if the Sentence Is Pangram||85.4%|Easy|| -|1833|Maximum Ice Cream Bars||96.7%|Medium|| -|1834|Single-Threaded CPU||40.4%|Medium|| -|1835|Find XOR Sum of All Pairs Bitwise AND||54.2%|Hard|| +|1833|Maximum Ice Cream Bars||94.0%|Medium|| +|1834|Single-Threaded CPU||40.2%|Medium|| +|1835|Find XOR Sum of All Pairs Bitwise AND||54.6%|Hard|| |1836|Remove Duplicates From an Unsorted Linked List||77.3%|Medium|| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------| diff --git a/website/content/ChapterFour/0200~0299/0218.The-Skyline-Problem.md b/website/content/ChapterFour/0200~0299/0218.The-Skyline-Problem.md index 72623c5e..d3afdcab 100755 --- a/website/content/ChapterFour/0200~0299/0218.The-Skyline-Problem.md +++ b/website/content/ChapterFour/0200~0299/0218.The-Skyline-Problem.md @@ -48,7 +48,12 @@ For instance, the skyline in Figure B should be represented as:`[ [2 10], [3 15] - 给出一个二维数组,每个子数组里面代表一个高楼的信息,一个高楼的信息包含 3 个信息,高楼起始坐标,高楼终止坐标,高楼高度。要求找到这些高楼的边际点,并输出这些边际点的高度信息。 -- 这一题可以用线段树来解。用线段树来解答,可以不用关心“楼挡住楼”的情况。由于楼的坐标是离散的,所以先把楼在 X 轴上两个坐标离散化。同第 699 题一样,楼的宽度是一个区间,但是离散的过程中,楼的宽度右边界需要减一,不然查询一个区间会包含两个点,导致错误的结果,例如,第一个楼是 [1,3),楼高 10,第二个楼是 [3,6),楼高 20 。第一个楼如果算上右边界 3,查询 [1,3] 的结果是 20,因为 [3,3] 这个点会查询到第二个楼上面去。所以每个楼的右边界应该减一。但是每个楼的右边界也要加入到 query 中,因为最终 query 的结果需要包含这些边界。将离散的数据排序以后,按照楼的信息,每个区间依次 update。最后统计的时候依次统计每个区间,如果当前区间的高度和前一个区间的高度一样,就算是等高的楼。当高度与前一个高度不相同的时候就算是天际线的边缘,就要添加到最后输出数组中。 +- 这一题可以用树状数组来解答。要求天际线,即找到楼与楼重叠区间外边缘的线,说白了是维护各个区间内的最值。这有 2 个需要解决的问题。 + 1. 如何维护最值。当一个高楼的右边界消失,剩下的各个小楼间还需要选出最大值作为天际线。剩下重重叠叠的小楼很多,树状数组如何维护区间最值是解决此类题的关键。 + 2. 如何维护天际线的转折点。有些楼与楼并非完全重叠,重叠一半的情况导致天际线出现转折点。如上图中标记的红色转折点。树状数组如何维护这些点呢? +- 先解决第一个问题(维护最值)。树状数组只有 2 个操作,一个是 Add() 一个是 Query()。从上面关于这 2 个操作的讲解中可以知道这 2 个操作都不能满足我们的需求。Add() 操作可以改成维护区间内 max() 的操作。但是 max() 容易获得却很难“去除”。如上图 [3,7] 这个区间内的最大值是 15。根据树状数组的定义,[3,12] 这个区间内最值还是 15。观察上图可以看到 [5,12] 区间内最值其实是 12。树状数组如何维护这种最值呢?最大值既然难以“去除”,那么需要考虑如何让最大值“来的晚一点”。解决办法是将 Query() 操作含义从前缀含义改成后缀含义。Query(i) 查询区间是 [1,i],现在查询区间变成 {{< katex >}}[i,+\infty){{< /katex >}}。例如:[i,j] 区间内最值是 {{< katex >}}max_{i...j}{{< /katex >}},Query(j+1) 的结果不会包含 {{< katex >}}max_{i...j}{{< /katex >}},因为它查询的区间是 {{< katex >}}[j+1,+\infty){{< /katex >}}。这样更改以后,可以有效避免前驱高楼对后面楼的累积 max() 最值的影响。具体做法,将 x 轴上的各个区间排序,按照 x 值大小从小到大排序。从左往右依次遍历各个区间。Add() 操作含义是加入每个区间右边界代表后缀区间的最值。这样不需要考虑“移除”最值的问题了。细心的读者可能又有疑问了:能否从右往左遍历区间,Query() 的含义继续延续前缀区间?这样做是可行的,解决第一个问题(维护最值)是可以的。但是这种处理办法解决第二个问题(维护转折点)会遇到麻烦。 +- 再解决第二个问题(维护转折点)。如果用前缀含义的 Query(),在单点 i 上除了考虑以这个点为结束点的区间,还需要考虑以这个单点 i 为起点的区间。如果是后缀含义的 Query() 就没有这个问题了,{{< katex >}}[i+1,+\infty){{< /katex >}} 这个区间内不用考虑以单点 i 为结束点的区间。此题用树状数组代码实现见下面解法一。 +- 这一题也可以用线段树来解。用线段树来解答,可以不用关心“楼挡住楼”的情况。由于楼的坐标是离散的,所以先把楼在 X 轴上两个坐标离散化。同第 699 题一样,楼的宽度是一个区间,但是离散的过程中,楼的宽度右边界需要减一,不然查询一个区间会包含两个点,导致错误的结果,例如,第一个楼是 [1,3),楼高 10,第二个楼是 [3,6),楼高 20 。第一个楼如果算上右边界 3,查询 [1,3] 的结果是 20,因为 [3,3] 这个点会查询到第二个楼上面去。所以每个楼的右边界应该减一。但是每个楼的右边界也要加入到 query 中,因为最终 query 的结果需要包含这些边界。将离散的数据排序以后,按照楼的信息,每个区间依次 update。最后统计的时候依次统计每个区间,如果当前区间的高度和前一个区间的高度一样,就算是等高的楼。当高度与前一个高度不相同的时候就算是天际线的边缘,就要添加到最后输出数组中。 - 类似的线段树的题目有:第 715 题,第 732 题,第 699 题。第 715 题是区间更新定值(**不是增减**),第 218 题可以用扫描线,第 732 题和第 699 题类似,也是俄罗斯方块的题目,但是第 732 题的俄罗斯方块的方块会“断裂”。 - 这一题用线段树做时间复杂度有点高,可以用扫描线解题。扫描线的思路很简单,用一根根垂直于 X 轴的竖线,从最左边依次扫到最右边,扫描每一条大楼的边界,当进入大楼的左边界的时候,如果没有比这个左边界最高点更高的点,就记录下这个最高点 keyPoint,状态是进入状态。如果扫到一个大楼的左边界,有比它更高的高度,就不记录,因为它不是天际线,它被楼挡楼,挡在其他楼后面了。当扫到一个大楼的右边界的时候,如果是最高点,那么记录下它的状态是离开状态,此时还需要记录下第二高的点。在扫描线扫描的过程中,动态的维护大楼的高度,同时维护最高的高度和第二高的高度。其实只需要维护最高的高度这一个高度,因为当离开状态到来的时候,移除掉当前最高的,剩下的高度里面最高的就是第二高的高度。描述的伪代码如下: @@ -82,8 +87,83 @@ import ( "github.com/halfrost/LeetCode-Go/template" ) -// 解法一 线段树 Segment Tree,时间复杂度 O(n log n) +// 解法一 树状数组,时间复杂度 O(n log n) +const LEFTSIDE = 1 +const RIGHTSIDE = 2 + +type Point struct { + xAxis int + side int + index int +} + func getSkyline(buildings [][]int) [][]int { + res := [][]int{} + if len(buildings) == 0 { + return res + } + allPoints, bit := make([]Point, 0), BinaryIndexedTree{} + // [x-axis (value), [1 (left) | 2 (right)], index (building number)] + for i, b := range buildings { + allPoints = append(allPoints, Point{xAxis: b[0], side: LEFTSIDE, index: i}) + allPoints = append(allPoints, Point{xAxis: b[1], side: RIGHTSIDE, index: i}) + } + sort.Slice(allPoints, func(i, j int) bool { + if allPoints[i].xAxis == allPoints[j].xAxis { + return allPoints[i].side < allPoints[j].side + } + return allPoints[i].xAxis < allPoints[j].xAxis + }) + bit.Init(len(allPoints)) + kth := make(map[Point]int) + for i := 0; i < len(allPoints); i++ { + kth[allPoints[i]] = i + } + for i := 0; i < len(allPoints); i++ { + pt := allPoints[i] + if pt.side == LEFTSIDE { + bit.Add(kth[Point{xAxis: buildings[pt.index][1], side: RIGHTSIDE, index: pt.index}], buildings[pt.index][2]) + } + currHeight := bit.Query(kth[pt] + 1) + if len(res) == 0 || res[len(res)-1][1] != currHeight { + if len(res) > 0 && res[len(res)-1][0] == pt.xAxis { + res[len(res)-1][1] = currHeight + } else { + res = append(res, []int{pt.xAxis, currHeight}) + } + } + } + return res +} + +type BinaryIndexedTree struct { + tree []int + capacity int +} + +// Init define +func (bit *BinaryIndexedTree) Init(capacity int) { + bit.tree, bit.capacity = make([]int, capacity+1), capacity +} + +// Add define +func (bit *BinaryIndexedTree) Add(index int, val int) { + for ; index > 0; index -= index & -index { + bit.tree[index] = max(bit.tree[index], val) + } +} + +// Query define +func (bit *BinaryIndexedTree) Query(index int) int { + sum := 0 + for ; index <= bit.capacity; index += index & -index { + sum = max(sum, bit.tree[index]) + } + return sum +} + +// 解法三 线段树 Segment Tree,时间复杂度 O(n log n) +func getSkyline1(buildings [][]int) [][]int { st, ans, lastHeight, check := template.SegmentTree{}, [][]int{}, 0, false posMap, pos := discretization218(buildings) tmp := make([]int, len(posMap)) @@ -123,8 +203,15 @@ func discretization218(positions [][]int) (map[int]int, []int) { return posMap, posArray } -// 解法二 扫描线 Sweep Line,时间复杂度 O(n log n) -func getSkyline1(buildings [][]int) [][]int { +func max(a int, b int) int { + if a > b { + return a + } + return b +} + +// 解法三 扫描线 Sweep Line,时间复杂度 O(n log n) +func getSkyline2(buildings [][]int) [][]int { size := len(buildings) es := make([]E, 0) for i, b := range buildings { @@ -284,6 +371,7 @@ func (q *IndexMaxPQ) less(i, j int) bool { return q.items[q.pq[i]] < q.items[q.pq[j]] } + ``` diff --git a/website/content/ChapterThree/Segment_Tree.md b/website/content/ChapterThree/Segment_Tree.md index f7c1ff65..c0fc16a9 100644 --- a/website/content/ChapterThree/Segment_Tree.md +++ b/website/content/ChapterThree/Segment_Tree.md @@ -57,7 +57,7 @@ weight: 1 3. 树的内部节点将代表其子节点的合并或并集结果。 4. 每个子节点可代表其父节点所代表范围的大约一半。(二分的思想) -使用大小为 {{< katex >}}\approx 4 \ast n {{< /katex >}} 的数组可以轻松表示 n 个元素范围的线段树。 ([Stack Overflow](http://stackoverflow.com/q/28470692/2844164) 对原因进行了很好的讨论。如果你还不确定,请不要担心。本文将在稍后进行讨论。) +使用大小为 {{< katex >}}\approx 4 \ast n {{< /katex >}} 的数组可以轻松表示 n 个元素范围的线段树。([Stack Overflow](http://stackoverflow.com/q/28470692/2844164) 对原因进行了很好的讨论。如果你还不确定,请不要担心。本文将在稍后进行讨论。) 下标为 i 的节点有两个节点,下标分别为 {{< katex >}}(2 \ast i + 1) {{< /katex >}}和 {{< katex >}}(2 \ast i + 2){{< /katex >}}。 diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index b5d704b6..56f81f20 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -22,7 +22,7 @@ weight: 1 |0035|Search Insert Position|[Go]({{< relref "/ChapterFour/0001~0099/0035.Search-Insert-Position.md" >}})|Easy||||42.9%| |0039|Combination Sum|[Go]({{< relref "/ChapterFour/0001~0099/0039.Combination-Sum.md" >}})|Medium| O(n log n)| O(n)||59.9%| |0040|Combination Sum II|[Go]({{< relref "/ChapterFour/0001~0099/0040.Combination-Sum-II.md" >}})|Medium| O(n log n)| O(n)||50.5%| -|0041|First Missing Positive|[Go]({{< relref "/ChapterFour/0001~0099/0041.First-Missing-Positive.md" >}})|Hard| O(n)| O(n)||34.0%| +|0041|First Missing Positive|[Go]({{< relref "/ChapterFour/0001~0099/0041.First-Missing-Positive.md" >}})|Hard| O(n)| O(n)||34.1%| |0042|Trapping Rain Water|[Go]({{< relref "/ChapterFour/0001~0099/0042.Trapping-Rain-Water.md" >}})|Hard| O(n)| O(1)|❤️|51.7%| |0045|Jump Game II|[Go]({{< relref "/ChapterFour/0001~0099/0045.Jump-Game-II.md" >}})|Medium||||31.8%| |0048|Rotate Image|[Go]({{< relref "/ChapterFour/0001~0099/0048.Rotate-Image.md" >}})|Medium| O(n)| O(1)||60.7%| @@ -49,11 +49,11 @@ weight: 1 |0105|Construct Binary Tree from Preorder and Inorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md" >}})|Medium||||52.6%| |0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal.md" >}})|Medium||||50.3%| |0118|Pascal's Triangle|[Go]({{< relref "/ChapterFour/0100~0199/0118.Pascals-Triangle.md" >}})|Easy||||55.7%| -|0119|Pascal's Triangle II|[Go]({{< relref "/ChapterFour/0100~0199/0119.Pascals-Triangle-II.md" >}})|Easy||||52.6%| +|0119|Pascal's Triangle II|[Go]({{< relref "/ChapterFour/0100~0199/0119.Pascals-Triangle-II.md" >}})|Easy||||52.7%| |0120|Triangle|[Go]({{< relref "/ChapterFour/0100~0199/0120.Triangle.md" >}})|Medium| O(n^2)| O(n)||46.9%| |0121|Best Time to Buy and Sell Stock|[Go]({{< relref "/ChapterFour/0100~0199/0121.Best-Time-to-Buy-and-Sell-Stock.md" >}})|Easy| O(n)| O(1)||51.9%| |0122|Best Time to Buy and Sell Stock II|[Go]({{< relref "/ChapterFour/0100~0199/0122.Best-Time-to-Buy-and-Sell-Stock-II.md" >}})|Easy| O(n)| O(1)||58.9%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.8%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| |0128|Longest Consecutive Sequence|[Go]({{< relref "/ChapterFour/0100~0199/0128.Longest-Consecutive-Sequence.md" >}})|Hard||||46.6%| |0152|Maximum Product Subarray|[Go]({{< relref "/ChapterFour/0100~0199/0152.Maximum-Product-Subarray.md" >}})|Medium| O(n)| O(1)||32.9%| |0153|Find Minimum in Rotated Sorted Array|[Go]({{< relref "/ChapterFour/0100~0199/0153.Find-Minimum-in-Rotated-Sorted-Array.md" >}})|Medium||||46.5%| @@ -103,14 +103,14 @@ weight: 1 |0832|Flipping an Image|[Go]({{< relref "/ChapterFour/0800~0899/0832.Flipping-an-Image.md" >}})|Easy||||78.4%| |0867|Transpose Matrix|[Go]({{< relref "/ChapterFour/0800~0899/0867.Transpose-Matrix.md" >}})|Easy| O(n)| O(1)||61.9%| |0870|Advantage Shuffle|[Go]({{< relref "/ChapterFour/0800~0899/0870.Advantage-Shuffle.md" >}})|Medium||||50.7%| -|0888|Fair Candy Swap|[Go]({{< relref "/ChapterFour/0800~0899/0888.Fair-Candy-Swap.md" >}})|Easy||||59.1%| +|0888|Fair Candy Swap|[Go]({{< relref "/ChapterFour/0800~0899/0888.Fair-Candy-Swap.md" >}})|Easy||||59.2%| |0891|Sum of Subsequence Widths|[Go]({{< relref "/ChapterFour/0800~0899/0891.Sum-of-Subsequence-Widths.md" >}})|Hard| O(n log n)| O(1)||33.1%| |0896|Monotonic Array|[Go]({{< relref "/ChapterFour/0800~0899/0896.Monotonic-Array.md" >}})|Easy||||57.9%| |0907|Sum of Subarray Minimums|[Go]({{< relref "/ChapterFour/0900~0999/0907.Sum-of-Subarray-Minimums.md" >}})|Medium| O(n)| O(n)|❤️|33.1%| |0914|X of a Kind in a Deck of Cards|[Go]({{< relref "/ChapterFour/0900~0999/0914.X-of-a-Kind-in-a-Deck-of-Cards.md" >}})|Easy||||33.9%| |0918|Maximum Sum Circular Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0918.Maximum-Sum-Circular-Subarray.md" >}})|Medium||||34.4%| |0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0900~0999/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1)||70.7%| -|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}})|Medium| O(n)| O(1)|❤️|68.9%| +|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}})|Medium| O(n)| O(1)|❤️|68.8%| |0977|Squares of a Sorted Array|[Go]({{< relref "/ChapterFour/0900~0999/0977.Squares-of-a-Sorted-Array.md" >}})|Easy| O(n)| O(1)||71.8%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||46.7%| |0985|Sum of Even Numbers After Queries|[Go]({{< relref "/ChapterFour/0900~0999/0985.Sum-of-Even-Numbers-After-Queries.md" >}})|Easy||||60.6%| @@ -129,18 +129,18 @@ weight: 1 |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||40.9%| |1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1100~1199/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.9%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1100~1199/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||60.4%| -|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1100~1199/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||53.8%| +|1184|Distance Between Bus Stops|[Go]({{< relref "/ChapterFour/1100~1199/1184.Distance-Between-Bus-Stops.md" >}})|Easy||||53.9%| |1185|Day of the Week|[Go]({{< relref "/ChapterFour/1100~1199/1185.Day-of-the-Week.md" >}})|Easy||||61.0%| |1200|Minimum Absolute Difference|[Go]({{< relref "/ChapterFour/1200~1299/1200.Minimum-Absolute-Difference.md" >}})|Easy||||67.1%| |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||49.1%| |1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.3%| |1217|Minimum Cost to Move Chips to The Same Position|[Go]({{< relref "/ChapterFour/1200~1299/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position.md" >}})|Easy||||70.9%| -|1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1200~1299/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.2%| +|1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1200~1299/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.1%| |1252|Cells with Odd Values in a Matrix|[Go]({{< relref "/ChapterFour/1200~1299/1252.Cells-with-Odd-Values-in-a-Matrix.md" >}})|Easy||||78.6%| |1260|Shift 2D Grid|[Go]({{< relref "/ChapterFour/1200~1299/1260.Shift-2D-Grid.md" >}})|Easy||||61.8%| |1266|Minimum Time Visiting All Points|[Go]({{< relref "/ChapterFour/1200~1299/1266.Minimum-Time-Visiting-All-Points.md" >}})|Easy||||79.3%| |1275|Find Winner on a Tic Tac Toe Game|[Go]({{< relref "/ChapterFour/1200~1299/1275.Find-Winner-on-a-Tic-Tac-Toe-Game.md" >}})|Easy||||52.9%| -|1287|Element Appearing More Than 25% In Sorted Array|[Go]({{< relref "/ChapterFour/1200~1299/1287.Element-Appearing-More-Than-25-In-Sorted-Array.md" >}})|Easy||||60.3%| +|1287|Element Appearing More Than 25% In Sorted Array|[Go]({{< relref "/ChapterFour/1200~1299/1287.Element-Appearing-More-Than-25-In-Sorted-Array.md" >}})|Easy||||60.4%| |1295|Find Numbers with Even Number of Digits|[Go]({{< relref "/ChapterFour/1200~1299/1295.Find-Numbers-with-Even-Number-of-Digits.md" >}})|Easy||||78.7%| |1299|Replace Elements with Greatest Element on Right Side|[Go]({{< relref "/ChapterFour/1200~1299/1299.Replace-Elements-with-Greatest-Element-on-Right-Side.md" >}})|Easy||||74.6%| |1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300~1399/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.0%| @@ -153,10 +153,10 @@ weight: 1 |1389|Create Target Array in the Given Order|[Go]({{< relref "/ChapterFour/1300~1399/1389.Create-Target-Array-in-the-Given-Order.md" >}})|Easy||||84.9%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||47.0%| |1437|Check If All 1's Are at Least Length K Places Away|[Go]({{< relref "/ChapterFour/1400~1499/1437.Check-If-All-1s-Are-at-Least-Length-K-Places-Away.md" >}})|Easy||||61.8%| -|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go]({{< relref "/ChapterFour/1400~1499/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit.md" >}})|Medium||||44.4%| +|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go]({{< relref "/ChapterFour/1400~1499/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit.md" >}})|Medium||||44.5%| |1464|Maximum Product of Two Elements in an Array|[Go]({{< relref "/ChapterFour/1400~1499/1464.Maximum-Product-of-Two-Elements-in-an-Array.md" >}})|Easy||||77.1%| |1470|Shuffle the Array|[Go]({{< relref "/ChapterFour/1400~1499/1470.Shuffle-the-Array.md" >}})|Easy||||88.1%| -|1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1400~1499/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||88.6%| +|1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1400~1499/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||88.5%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.6%| |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1500~1599/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||54.8%| |1608|Special Array With X Elements Greater Than or Equal X|[Go]({{< relref "/ChapterFour/1600~1699/1608.Special-Array-With-X-Elements-Greater-Than-or-Equal-X.md" >}})|Easy||||61.4%| @@ -167,7 +167,7 @@ weight: 1 |1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.1%| |1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1600~1699/1652.Defuse-the-Bomb.md" >}})|Easy||||61.6%| |1656|Design an Ordered Stream|[Go]({{< relref "/ChapterFour/1600~1699/1656.Design-an-Ordered-Stream.md" >}})|Easy||||82.0%| -|1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1600~1699/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.2%| +|1672|Richest Customer Wealth|[Go]({{< relref "/ChapterFour/1600~1699/1672.Richest-Customer-Wealth.md" >}})|Easy||||88.1%| |1700|Number of Students Unable to Eat Lunch|[Go]({{< relref "/ChapterFour/1700~1799/1700.Number-of-Students-Unable-to-Eat-Lunch.md" >}})|Easy||||67.6%| |1732|Find the Highest Altitude|[Go]({{< relref "/ChapterFour/1700~1799/1732.Find-the-Highest-Altitude.md" >}})|Easy||||79.8%| |1742|Maximum Number of Balls in a Box|[Go]({{< relref "/ChapterFour/1700~1799/1742.Maximum-Number-of-Balls-in-a-Box.md" >}})|Easy||||73.6%| diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index e66fe594..331c59c2 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -116,7 +116,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0089|Gray Code|[Go]({{< relref "/ChapterFour/0001~0099/0089.Gray-Code.md" >}})|Medium| O(n)| O(1)||50.8%| |0090|Subsets II|[Go]({{< relref "/ChapterFour/0001~0099/0090.Subsets-II.md" >}})|Medium| O(n^2)| O(n)|❤️|49.3%| |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0001~0099/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|38.0%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.8%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| |0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|52.8%| |0211|Design Add and Search Words Data Structure|[Go]({{< relref "/ChapterFour/0200~0299/0211.Design-Add-and-Search-Words-Data-Structure.md" >}})|Medium| O(n)| O(n)|❤️|40.7%| |0212|Word Search II|[Go]({{< relref "/ChapterFour/0200~0299/0212.Word-Search-II.md" >}})|Hard| O(n^2)| O(n^2)|❤️|37.6%| @@ -128,7 +128,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0784|Letter Case Permutation|[Go]({{< relref "/ChapterFour/0700~0799/0784.Letter-Case-Permutation.md" >}})|Medium| O(n)| O(n)||68.8%| |0842|Split Array into Fibonacci Sequence|[Go]({{< relref "/ChapterFour/0800~0899/0842.Split-Array-into-Fibonacci-Sequence.md" >}})|Medium| O(n^2)| O(1)|❤️|37.0%| |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.1%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.5%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.6%| |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|76.0%| |1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.4%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.0%| diff --git a/website/content/ChapterTwo/Binary_Search.md b/website/content/ChapterTwo/Binary_Search.md index 2fd2ec8e..f8b9f1a9 100644 --- a/website/content/ChapterTwo/Binary_Search.md +++ b/website/content/ChapterTwo/Binary_Search.md @@ -192,7 +192,7 @@ func peakIndexInMountainArray(A []int) int { |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||40.9%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1100~1199/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||60.4%| |1201|Ugly Number III|[Go]({{< relref "/ChapterFour/1200~1299/1201.Ugly-Number-III.md" >}})|Medium||||26.5%| -|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.8%| +|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.7%| |1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1200~1299/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||50.0%| |1300|Sum of Mutated Array Closest to Target|[Go]({{< relref "/ChapterFour/1300~1399/1300.Sum-of-Mutated-Array-Closest-to-Target.md" >}})|Medium||||43.0%| |1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.1%| diff --git a/website/content/ChapterTwo/Bit_Manipulation.md b/website/content/ChapterTwo/Bit_Manipulation.md index 0c4ef582..d9e2c37a 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -75,7 +75,7 @@ X & ~X = 0 |0898|Bitwise ORs of Subarrays|[Go]({{< relref "/ChapterFour/0800~0899/0898.Bitwise-ORs-of-Subarrays.md" >}})|Medium| O(n)| O(1)||34.5%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.8%| |1290|Convert Binary Number in a Linked List to Integer|[Go]({{< relref "/ChapterFour/1200~1299/1290.Convert-Binary-Number-in-a-Linked-List-to-Integer.md" >}})|Easy||||81.7%| -|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.2%| +|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.3%| |1720|Decode XORed Array|[Go]({{< relref "/ChapterFour/1700~1799/1720.Decode-XORed-Array.md" >}})|Easy||||85.2%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Breadth_First_Search.md b/website/content/ChapterTwo/Breadth_First_Search.md index 73326c35..a796f736 100644 --- a/website/content/ChapterTwo/Breadth_First_Search.md +++ b/website/content/ChapterTwo/Breadth_First_Search.md @@ -11,13 +11,13 @@ weight: 10 |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0101|Symmetric Tree|[Go]({{< relref "/ChapterFour/0100~0199/0101.Symmetric-Tree.md" >}})|Easy| O(n)| O(1)||48.6%| |0102|Binary Tree Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0102.Binary-Tree-Level-Order-Traversal.md" >}})|Medium| O(n)| O(1)||57.1%| -|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.5%| +|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.6%| |0107|Binary Tree Level Order Traversal II|[Go]({{< relref "/ChapterFour/0100~0199/0107.Binary-Tree-Level-Order-Traversal-II.md" >}})|Medium| O(n)| O(1)||55.6%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.9%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.8%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| |0127|Word Ladder|[Go]({{< relref "/ChapterFour/0100~0199/0127.Word-Ladder.md" >}})|Hard| O(n)| O(n)||32.3%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})|Medium||||29.9%| -|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.6%| +|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.7%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||49.7%| |0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||43.1%| @@ -34,7 +34,7 @@ weight: 10 |0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |1091|Shortest Path in Binary Matrix|[Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}})|Medium||||40.2%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.2%| -|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.6%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.5%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index 56bc8545..89789d09 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -22,13 +22,13 @@ weight: 9 |0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.9%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.9%| |0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.7%| -|0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.6%| +|0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.7%| |0114|Flatten Binary Tree to Linked List|[Go]({{< relref "/ChapterFour/0100~0199/0114.Flatten-Binary-Tree-to-Linked-List.md" >}})|Medium| O(n)| O(1)||52.6%| |0124|Binary Tree Maximum Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0124.Binary-Tree-Maximum-Path-Sum.md" >}})|Hard| O(n)| O(1)||35.7%| |0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.4%| |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})|Medium||||29.9%| |0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium||||52.8%| -|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.6%| +|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.7%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})|Medium| O(n^2)| O(n^2)||49.7%| |0207|Course Schedule|[Go]({{< relref "/ChapterFour/0200~0299/0207.Course-Schedule.md" >}})|Medium| O(n^2)| O(n^2)||44.3%| |0210|Course Schedule II|[Go]({{< relref "/ChapterFour/0200~0299/0210.Course-Schedule-II.md" >}})|Medium| O(n^2)| O(n^2)||43.1%| @@ -38,7 +38,7 @@ weight: 9 |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.0%| |0394|Decode String|[Go]({{< relref "/ChapterFour/0300~0399/0394.Decode-String.md" >}})|Medium| O(n)| O(n)||53.1%| |0417|Pacific Atlantic Water Flow|[Go]({{< relref "/ChapterFour/0400~0499/0417.Pacific-Atlantic-Water-Flow.md" >}})|Medium||||44.1%| -|0491|Increasing Subsequences|[Go]({{< relref "/ChapterFour/0400~0499/0491.Increasing-Subsequences.md" >}})|Medium||||47.8%| +|0491|Increasing Subsequences|[Go]({{< relref "/ChapterFour/0400~0499/0491.Increasing-Subsequences.md" >}})|Medium||||47.9%| |0494|Target Sum|[Go]({{< relref "/ChapterFour/0400~0499/0494.Target-Sum.md" >}})|Medium||||45.6%| |0513|Find Bottom Left Tree Value|[Go]({{< relref "/ChapterFour/0500~0599/0513.Find-Bottom-Left-Tree-Value.md" >}})|Medium||||62.9%| |0515|Find Largest Value in Each Tree Row|[Go]({{< relref "/ChapterFour/0500~0599/0515.Find-Largest-Value-in-Each-Tree-Row.md" >}})|Medium| O(n)| O(n)||62.5%| @@ -51,9 +51,9 @@ weight: 9 |0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.3%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard||||33.2%| |0695|Max Area of Island|[Go]({{< relref "/ChapterFour/0600~0699/0695.Max-Area-of-Island.md" >}})|Medium||||65.3%| -|0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium||||52.4%| +|0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium||||52.5%| |0733|Flood Fill|[Go]({{< relref "/ChapterFour/0700~0799/0733.Flood-Fill.md" >}})|Easy||||56.0%| -|0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0700~0799/0753.Cracking-the-Safe.md" >}})|Hard||||52.6%| +|0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0700~0799/0753.Cracking-the-Safe.md" >}})|Hard||||52.7%| |0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium||||55.7%| |0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard||||55.0%| |0783|Minimum Distance Between BST Nodes|[Go]({{< relref "/ChapterFour/0700~0799/0783.Minimum-Distance-Between-BST-Nodes.md" >}})|Easy||||54.3%| @@ -68,11 +68,11 @@ weight: 9 |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0800~0899/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.7%| |0924|Minimize Malware Spread|[Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}})|Hard||||41.9%| |0928|Minimize Malware Spread II|[Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}})|Hard||||41.5%| -|0947|Most Stones Removed with Same Row or Column|[Go]({{< relref "/ChapterFour/0900~0999/0947.Most-Stones-Removed-with-Same-Row-or-Column.md" >}})|Medium||||55.6%| +|0947|Most Stones Removed with Same Row or Column|[Go]({{< relref "/ChapterFour/0900~0999/0947.Most-Stones-Removed-with-Same-Row-or-Column.md" >}})|Medium||||55.7%| |0959|Regions Cut By Slashes|[Go]({{< relref "/ChapterFour/0900~0999/0959.Regions-Cut-By-Slashes.md" >}})|Medium||||67.2%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||39.0%| |0971|Flip Binary Tree To Match Preorder Traversal|[Go]({{< relref "/ChapterFour/0900~0999/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal.md" >}})|Medium||||50.1%| -|0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||69.9%| +|0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||70.0%| |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||77.1%| |0987|Vertical Order Traversal of a Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})|Hard||||39.1%| |1020|Number of Enclaves|[Go]({{< relref "/ChapterFour/1000~1099/1020.Number-of-Enclaves.md" >}})|Medium||||59.3%| @@ -86,7 +86,7 @@ weight: 9 |1254|Number of Closed Islands|[Go]({{< relref "/ChapterFour/1200~1299/1254.Number-of-Closed-Islands.md" >}})|Medium||||62.0%| |1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||85.5%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.2%| -|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.6%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.5%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Dynamic_Programming.md b/website/content/ChapterTwo/Dynamic_Programming.md index 1139494d..f968997b 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -64,14 +64,14 @@ weight: 7 |1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1000~1099/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard||||64.9%| |1105|Filling Bookcase Shelves|[Go]({{< relref "/ChapterFour/1100~1199/1105.Filling-Bookcase-Shelves.md" >}})|Medium||||57.5%| |1143|Longest Common Subsequence|[Go]({{< relref "/ChapterFour/1100~1199/1143.Longest-Common-Subsequence.md" >}})|Medium||||58.7%| -|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.8%| +|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.7%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||47.0%| |1463|Cherry Pickup II|[Go]({{< relref "/ChapterFour/1400~1499/1463.Cherry-Pickup-II.md" >}})|Hard||||68.8%| |1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||75.4%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.0%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.0%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.6%| -|1664|Ways to Make a Fair Array|[Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}})|Medium||||62.2%| +|1664|Ways to Make a Fair Array|[Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}})|Medium||||62.1%| |1690|Stone Game VII|[Go]({{< relref "/ChapterFour/1600~1699/1690.Stone-Game-VII.md" >}})|Medium||||49.1%| |1691|Maximum Height by Stacking Cuboids|[Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}})|Hard||||50.5%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Hash_Table.md b/website/content/ChapterTwo/Hash_Table.md index a35a6c77..44204a1d 100644 --- a/website/content/ChapterTwo/Hash_Table.md +++ b/website/content/ChapterTwo/Hash_Table.md @@ -22,7 +22,7 @@ weight: 13 |0138|Copy List with Random Pointer|[Go]({{< relref "/ChapterFour/0100~0199/0138.Copy-List-with-Random-Pointer.md" >}})|Medium| O(n)| O(1)||41.7%| |0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0100~0199/0187.Repeated-DNA-Sequences.md" >}})|Medium||||41.7%| |0202|Happy Number|[Go]({{< relref "/ChapterFour/0200~0299/0202.Happy-Number.md" >}})|Easy| O(log n)| O(1)||51.4%| -|0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.3%| +|0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.4%| |0205|Isomorphic Strings|[Go]({{< relref "/ChapterFour/0200~0299/0205.Isomorphic-Strings.md" >}})|Easy| O(log n)| O(n)||40.7%| |0217|Contains Duplicate|[Go]({{< relref "/ChapterFour/0200~0299/0217.Contains-Duplicate.md" >}})|Easy| O(n)| O(n)||57.0%| |0219|Contains Duplicate II|[Go]({{< relref "/ChapterFour/0200~0299/0219.Contains-Duplicate-II.md" >}})|Easy| O(n)| O(n)||38.9%| @@ -36,7 +36,7 @@ weight: 13 |0389|Find the Difference|[Go]({{< relref "/ChapterFour/0300~0399/0389.Find-the-Difference.md" >}})|Easy||||58.0%| |0409|Longest Palindrome|[Go]({{< relref "/ChapterFour/0400~0499/0409.Longest-Palindrome.md" >}})|Easy||||52.3%| |0438|Find All Anagrams in a String|[Go]({{< relref "/ChapterFour/0400~0499/0438.Find-All-Anagrams-in-a-String.md" >}})|Medium| O(n)| O(1) ||45.3%| -|0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0400~0499/0447.Number-of-Boomerangs.md" >}})|Medium| O(n)| O(1) ||52.5%| +|0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0400~0499/0447.Number-of-Boomerangs.md" >}})|Medium| O(n)| O(1) ||52.6%| |0451|Sort Characters By Frequency|[Go]({{< relref "/ChapterFour/0400~0499/0451.Sort-Characters-By-Frequency.md" >}})|Medium| O(n log n)| O(1) ||64.7%| |0454|4Sum II|[Go]({{< relref "/ChapterFour/0400~0499/0454.4Sum-II.md" >}})|Medium| O(n^2)| O(n) ||54.7%| |0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}})|Easy||||66.9%| @@ -46,7 +46,7 @@ weight: 13 |0575|Distribute Candies|[Go]({{< relref "/ChapterFour/0500~0599/0575.Distribute-Candies.md" >}})|Easy||||64.4%| |0594|Longest Harmonious Subsequence|[Go]({{< relref "/ChapterFour/0500~0599/0594.Longest-Harmonious-Subsequence.md" >}})|Easy||||51.3%| |0599|Minimum Index Sum of Two Lists|[Go]({{< relref "/ChapterFour/0500~0599/0599.Minimum-Index-Sum-of-Two-Lists.md" >}})|Easy||||52.0%| -|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.6%| +|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.7%| |0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0600~0699/0645.Set-Mismatch.md" >}})|Easy||||41.0%| |0648|Replace Words|[Go]({{< relref "/ChapterFour/0600~0699/0648.Replace-Words.md" >}})|Medium| O(n)| O(n) ||59.2%| |0676|Implement Magic Dictionary|[Go]({{< relref "/ChapterFour/0600~0699/0676.Implement-Magic-Dictionary.md" >}})|Medium| O(n)| O(n) ||55.4%| @@ -75,7 +75,7 @@ weight: 13 |1078|Occurrences After Bigram|[Go]({{< relref "/ChapterFour/1000~1099/1078.Occurrences-After-Bigram.md" >}})|Easy||||65.0%| |1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1100~1199/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.9%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.8%| -|1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1100~1199/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||62.2%| +|1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1100~1199/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||62.3%| |1207|Unique Number of Occurrences|[Go]({{< relref "/ChapterFour/1200~1299/1207.Unique-Number-of-Occurrences.md" >}})|Easy||||72.0%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.6%| |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1500~1599/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||54.8%| diff --git a/website/content/ChapterTwo/Linked_List.md b/website/content/ChapterTwo/Linked_List.md index 516fd035..24f37a77 100644 --- a/website/content/ChapterTwo/Linked_List.md +++ b/website/content/ChapterTwo/Linked_List.md @@ -26,9 +26,9 @@ weight: 4 |0002|Add Two Numbers|[Go]({{< relref "/ChapterFour/0001~0099/0002.Add-Two-Numbers.md" >}})|Medium| O(n)| O(1)||35.8%| |0019|Remove Nth Node From End of List|[Go]({{< relref "/ChapterFour/0001~0099/0019.Remove-Nth-Node-From-End-of-List.md" >}})|Medium| O(n)| O(1)||36.2%| |0021|Merge Two Sorted Lists|[Go]({{< relref "/ChapterFour/0001~0099/0021.Merge-Two-Sorted-Lists.md" >}})|Easy| O(log n)| O(1)||56.5%| -|0023|Merge k Sorted Lists|[Go]({{< relref "/ChapterFour/0001~0099/0023.Merge-k-Sorted-Lists.md" >}})|Hard| O(log n)| O(1)|❤️|43.1%| +|0023|Merge k Sorted Lists|[Go]({{< relref "/ChapterFour/0001~0099/0023.Merge-k-Sorted-Lists.md" >}})|Hard| O(log n)| O(1)|❤️|43.2%| |0024|Swap Nodes in Pairs|[Go]({{< relref "/ChapterFour/0001~0099/0024.Swap-Nodes-in-Pairs.md" >}})|Medium| O(n)| O(1)||53.7%| -|0025|Reverse Nodes in k-Group|[Go]({{< relref "/ChapterFour/0001~0099/0025.Reverse-Nodes-in-k-Group.md" >}})|Hard| O(log n)| O(1)|❤️|45.5%| +|0025|Reverse Nodes in k-Group|[Go]({{< relref "/ChapterFour/0001~0099/0025.Reverse-Nodes-in-k-Group.md" >}})|Hard| O(log n)| O(1)|❤️|45.6%| |0061|Rotate List|[Go]({{< relref "/ChapterFour/0001~0099/0061.Rotate-List.md" >}})|Medium| O(n)| O(1)||32.0%| |0082|Remove Duplicates from Sorted List II|[Go]({{< relref "/ChapterFour/0001~0099/0082.Remove-Duplicates-from-Sorted-List-II.md" >}})|Medium| O(n)| O(1)||39.6%| |0083|Remove Duplicates from Sorted List|[Go]({{< relref "/ChapterFour/0001~0099/0083.Remove-Duplicates-from-Sorted-List.md" >}})|Easy| O(n)| O(1)||46.7%| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index 538e4ea5..efa1e54e 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -25,7 +25,7 @@ weight: 12 |0171|Excel Sheet Column Number|[Go]({{< relref "/ChapterFour/0100~0199/0171.Excel-Sheet-Column-Number.md" >}})|Easy||||57.2%| |0172|Factorial Trailing Zeroes|[Go]({{< relref "/ChapterFour/0100~0199/0172.Factorial-Trailing-Zeroes.md" >}})|Easy||||38.8%| |0202|Happy Number|[Go]({{< relref "/ChapterFour/0200~0299/0202.Happy-Number.md" >}})|Easy| O(log n)| O(1)||51.4%| -|0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.3%| +|0204|Count Primes|[Go]({{< relref "/ChapterFour/0200~0299/0204.Count-Primes.md" >}})|Easy||||32.4%| |0223|Rectangle Area|[Go]({{< relref "/ChapterFour/0200~0299/0223.Rectangle-Area.md" >}})|Medium||||38.4%| |0224|Basic Calculator|[Go]({{< relref "/ChapterFour/0200~0299/0224.Basic-Calculator.md" >}})|Hard| O(n)| O(n)||38.3%| |0231|Power of Two|[Go]({{< relref "/ChapterFour/0200~0299/0231.Power-of-Two.md" >}})|Easy| O(1)| O(1)||43.8%| @@ -43,7 +43,7 @@ weight: 12 |0413|Arithmetic Slices|[Go]({{< relref "/ChapterFour/0400~0499/0413.Arithmetic-Slices.md" >}})|Medium||||60.1%| |0423|Reconstruct Original Digits from English|[Go]({{< relref "/ChapterFour/0400~0499/0423.Reconstruct-Original-Digits-from-English.md" >}})|Medium||||50.9%| |0441|Arranging Coins|[Go]({{< relref "/ChapterFour/0400~0499/0441.Arranging-Coins.md" >}})|Easy||||42.7%| -|0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0400~0499/0447.Number-of-Boomerangs.md" >}})|Medium||||52.5%| +|0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0400~0499/0447.Number-of-Boomerangs.md" >}})|Medium||||52.6%| |0453|Minimum Moves to Equal Array Elements|[Go]({{< relref "/ChapterFour/0400~0499/0453.Minimum-Moves-to-Equal-Array-Elements.md" >}})|Easy||||51.0%| |0478|Generate Random Point in a Circle|[Go]({{< relref "/ChapterFour/0400~0499/0478.Generate-Random-Point-in-a-Circle.md" >}})|Medium||||39.1%| |0483|Smallest Good Base|[Go]({{< relref "/ChapterFour/0400~0499/0483.Smallest-Good-Base.md" >}})|Hard||||36.4%| @@ -54,7 +54,7 @@ weight: 12 |0628|Maximum Product of Three Numbers|[Go]({{< relref "/ChapterFour/0600~0699/0628.Maximum-Product-of-Three-Numbers.md" >}})|Easy| O(n)| O(1)||46.8%| |0633|Sum of Square Numbers|[Go]({{< relref "/ChapterFour/0600~0699/0633.Sum-of-Square-Numbers.md" >}})|Medium||||32.7%| |0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0600~0699/0645.Set-Mismatch.md" >}})|Easy||||41.0%| -|0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0700~0799/0753.Cracking-the-Safe.md" >}})|Hard||||52.6%| +|0753|Cracking the Safe|[Go]({{< relref "/ChapterFour/0700~0799/0753.Cracking-the-Safe.md" >}})|Hard||||52.7%| |0775|Global and Local Inversions|[Go]({{< relref "/ChapterFour/0700~0799/0775.Global-and-Local-Inversions.md" >}})|Medium||||46.2%| |0781|Rabbits in Forest|[Go]({{< relref "/ChapterFour/0700~0799/0781.Rabbits-in-Forest.md" >}})|Medium||||55.8%| |0812|Largest Triangle Area|[Go]({{< relref "/ChapterFour/0800~0899/0812.Largest-Triangle-Area.md" >}})|Easy||||59.1%| @@ -74,7 +74,7 @@ weight: 12 |0970|Powerful Integers|[Go]({{< relref "/ChapterFour/0900~0999/0970.Powerful-Integers.md" >}})|Medium||||40.1%| |0976|Largest Perimeter Triangle|[Go]({{< relref "/ChapterFour/0900~0999/0976.Largest-Perimeter-Triangle.md" >}})|Easy| O(n log n)| O(log n) ||59.4%| |0991|Broken Calculator|[Go]({{< relref "/ChapterFour/0900~0999/0991.Broken-Calculator.md" >}})|Medium||||49.7%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.5%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||48.6%| |1006|Clumsy Factorial|[Go]({{< relref "/ChapterFour/1000~1099/1006.Clumsy-Factorial.md" >}})|Medium||||53.7%| |1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1000~1099/1017.Convert-to-Base-2.md" >}})|Medium||||59.2%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.1%| @@ -85,7 +85,7 @@ weight: 12 |1175|Prime Arrangements|[Go]({{< relref "/ChapterFour/1100~1199/1175.Prime-Arrangements.md" >}})|Easy||||51.8%| |1201|Ugly Number III|[Go]({{< relref "/ChapterFour/1200~1299/1201.Ugly-Number-III.md" >}})|Medium||||26.5%| |1217|Minimum Cost to Move Chips to The Same Position|[Go]({{< relref "/ChapterFour/1200~1299/1217.Minimum-Cost-to-Move-Chips-to-The-Same-Position.md" >}})|Easy||||70.9%| -|1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1200~1299/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.2%| +|1232|Check If It Is a Straight Line|[Go]({{< relref "/ChapterFour/1200~1299/1232.Check-If-It-Is-a-Straight-Line.md" >}})|Easy||||43.1%| |1281|Subtract the Product and Sum of Digits of an Integer|[Go]({{< relref "/ChapterFour/1200~1299/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/1300~1399/1317.Convert-Integer-to-the-Sum-of-Two-No-Zero-Integers.md" >}})|Easy||||56.9%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.6%| diff --git a/website/content/ChapterTwo/Sliding_Window.md b/website/content/ChapterTwo/Sliding_Window.md index 9c1eeba4..ee03e48d 100644 --- a/website/content/ChapterTwo/Sliding_Window.md +++ b/website/content/ChapterTwo/Sliding_Window.md @@ -45,7 +45,7 @@ weight: 17 |1074|Number of Submatrices That Sum to Target|[Go]({{< relref "/ChapterFour/1000~1099/1074.Number-of-Submatrices-That-Sum-to-Target.md" >}})|Hard| O(n^3)| O(n) |❤️|64.9%| |1208|Get Equal Substrings Within Budget|[Go]({{< relref "/ChapterFour/1200~1299/1208.Get-Equal-Substrings-Within-Budget.md" >}})|Medium||||44.3%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||47.0%| -|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go]({{< relref "/ChapterFour/1400~1499/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit.md" >}})|Medium||||44.4%| +|1438|Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit|[Go]({{< relref "/ChapterFour/1400~1499/1438.Longest-Continuous-Subarray-With-Absolute-Diff-Less-Than-or-Equal-to-Limit.md" >}})|Medium||||44.5%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Sort.md b/website/content/ChapterTwo/Sort.md index 33033136..b94e15d0 100644 --- a/website/content/ChapterTwo/Sort.md +++ b/website/content/ChapterTwo/Sort.md @@ -34,18 +34,18 @@ weight: 14 |0349|Intersection of Two Arrays|[Go]({{< relref "/ChapterFour/0300~0399/0349.Intersection-of-Two-Arrays.md" >}})|Easy| O(n)| O(n) ||65.4%| |0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||52.2%| |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}})|Hard||||27.3%| -|0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium| O(n)| O(1) ||50.1%| +|0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium| O(n)| O(1) ||50.2%| |0710|Random Pick with Blacklist|[Go]({{< relref "/ChapterFour/0700~0799/0710.Random-Pick-with-Blacklist.md" >}})|Hard| O(n)| O(n) ||33.1%| |0767|Reorganize String|[Go]({{< relref "/ChapterFour/0700~0799/0767.Reorganize-String.md" >}})|Medium| O(n log n)| O(log n) |❤️|50.3%| -|0853|Car Fleet|[Go]({{< relref "/ChapterFour/0800~0899/0853.Car-Fleet.md" >}})|Medium| O(n log n)| O(log n) ||44.5%| +|0853|Car Fleet|[Go]({{< relref "/ChapterFour/0800~0899/0853.Car-Fleet.md" >}})|Medium| O(n log n)| O(log n) ||44.6%| |0922|Sort Array By Parity II|[Go]({{< relref "/ChapterFour/0900~0999/0922.Sort-Array-By-Parity-II.md" >}})|Easy| O(n)| O(1) ||70.7%| -|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}})|Medium| O(n log n)| O(log n) |❤️|68.9%| +|0969|Pancake Sorting|[Go]({{< relref "/ChapterFour/0900~0999/0969.Pancake-Sorting.md" >}})|Medium| O(n log n)| O(log n) |❤️|68.8%| |0973|K Closest Points to Origin|[Go]({{< relref "/ChapterFour/0900~0999/0973.K-Closest-Points-to-Origin.md" >}})|Medium| O(n log n)| O(log n) ||64.7%| |0976|Largest Perimeter Triangle|[Go]({{< relref "/ChapterFour/0900~0999/0976.Largest-Perimeter-Triangle.md" >}})|Easy| O(n log n)| O(log n) ||59.4%| |1030|Matrix Cells in Distance Order|[Go]({{< relref "/ChapterFour/1000~1099/1030.Matrix-Cells-in-Distance-Order.md" >}})|Easy| O(n^2)| O(1) ||68.3%| |1054|Distant Barcodes|[Go]({{< relref "/ChapterFour/1000~1099/1054.Distant-Barcodes.md" >}})|Medium| O(n log n)| O(log n) |❤️|44.3%| |1122|Relative Sort Array|[Go]({{< relref "/ChapterFour/1100~1199/1122.Relative-Sort-Array.md" >}})|Easy||||68.1%| -|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.8%| +|1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.7%| |1305|All Elements in Two Binary Search Trees|[Go]({{< relref "/ChapterFour/1300~1399/1305.All-Elements-in-Two-Binary-Search-Trees.md" >}})|Medium||||77.8%| |1329|Sort the Matrix Diagonally|[Go]({{< relref "/ChapterFour/1300~1399/1329.Sort-the-Matrix-Diagonally.md" >}})|Medium||||81.6%| |1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||67.0%| diff --git a/website/content/ChapterTwo/Stack.md b/website/content/ChapterTwo/Stack.md index fd1818d1..20678c23 100644 --- a/website/content/ChapterTwo/Stack.md +++ b/website/content/ChapterTwo/Stack.md @@ -22,8 +22,8 @@ weight: 5 |0071|Simplify Path|[Go]({{< relref "/ChapterFour/0001~0099/0071.Simplify-Path.md" >}})|Medium| O(n)| O(n)|❤️|35.0%| |0084|Largest Rectangle in Histogram|[Go]({{< relref "/ChapterFour/0001~0099/0084.Largest-Rectangle-in-Histogram.md" >}})|Hard| O(n)| O(n)|❤️|37.5%| |0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0001~0099/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||66.4%| -|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.5%| -|0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||57.9%| +|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.6%| +|0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.0%| |0145|Binary Tree Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0145.Binary-Tree-Postorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.2%| |0150|Evaluate Reverse Polish Notation|[Go]({{< relref "/ChapterFour/0100~0199/0150.Evaluate-Reverse-Polish-Notation.md" >}})|Medium| O(n)| O(1)||38.4%| |0155|Min Stack|[Go]({{< relref "/ChapterFour/0100~0199/0155.Min-Stack.md" >}})|Easy| O(n)| O(n)||46.9%| @@ -33,7 +33,7 @@ weight: 5 |0227|Basic Calculator II|[Go]({{< relref "/ChapterFour/0200~0299/0227.Basic-Calculator-II.md" >}})|Medium||||38.9%| |0232|Implement Queue using Stacks|[Go]({{< relref "/ChapterFour/0200~0299/0232.Implement-Queue-using-Stacks.md" >}})|Easy| O(n)| O(n)||52.8%| |0331|Verify Preorder Serialization of a Binary Tree|[Go]({{< relref "/ChapterFour/0300~0399/0331.Verify-Preorder-Serialization-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||41.2%| -|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||56.0%| +|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||55.9%| |0385|Mini Parser|[Go]({{< relref "/ChapterFour/0300~0399/0385.Mini-Parser.md" >}})|Medium||||34.7%| |0394|Decode String|[Go]({{< relref "/ChapterFour/0300~0399/0394.Decode-String.md" >}})|Medium| O(n)| O(n)||53.1%| |0402|Remove K Digits|[Go]({{< relref "/ChapterFour/0400~0499/0402.Remove-K-Digits.md" >}})|Medium| O(n)| O(1)||28.7%| @@ -56,7 +56,7 @@ weight: 5 |1003|Check If Word Is Valid After Substitutions|[Go]({{< relref "/ChapterFour/1000~1099/1003.Check-If-Word-Is-Valid-After-Substitutions.md" >}})|Medium| O(n)| O(1)||56.7%| |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1000~1099/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.3%| |1021|Remove Outermost Parentheses|[Go]({{< relref "/ChapterFour/1000~1099/1021.Remove-Outermost-Parentheses.md" >}})|Easy| O(n)| O(1)||79.2%| -|1047|Remove All Adjacent Duplicates In String|[Go]({{< relref "/ChapterFour/1000~1099/1047.Remove-All-Adjacent-Duplicates-In-String.md" >}})|Easy| O(n)| O(1)||71.4%| +|1047|Remove All Adjacent Duplicates In String|[Go]({{< relref "/ChapterFour/1000~1099/1047.Remove-All-Adjacent-Duplicates-In-String.md" >}})|Easy| O(n)| O(1)||71.5%| |1209|Remove All Adjacent Duplicates in String II|[Go]({{< relref "/ChapterFour/1200~1299/1209.Remove-All-Adjacent-Duplicates-in-String-II.md" >}})|Medium||||57.8%| |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.3%| |1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1600~1699/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||45.5%| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index 11e71271..8766fe06 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -11,7 +11,7 @@ weight: 2 |:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: | |0003|Longest Substring Without Repeating Characters|[Go]({{< relref "/ChapterFour/0001~0099/0003.Longest-Substring-Without-Repeating-Characters.md" >}})|Medium| O(n)| O(1)|❤️|31.6%| |0005|Longest Palindromic Substring|[Go]({{< relref "/ChapterFour/0001~0099/0005.Longest-Palindromic-Substring.md" >}})|Medium||||30.7%| -|0006|ZigZag Conversion|[Go]({{< relref "/ChapterFour/0001~0099/0006.ZigZag-Conversion.md" >}})|Medium||||38.3%| +|0006|ZigZag Conversion|[Go]({{< relref "/ChapterFour/0001~0099/0006.ZigZag-Conversion.md" >}})|Medium||||38.4%| |0008|String to Integer (atoi)|[Go]({{< relref "/ChapterFour/0001~0099/0008.String-to-Integer-atoi.md" >}})|Medium||||15.7%| |0012|Integer to Roman|[Go]({{< relref "/ChapterFour/0001~0099/0012.Integer-to-Roman.md" >}})|Medium||||57.2%| |0013|Roman to Integer|[Go]({{< relref "/ChapterFour/0001~0099/0013.Roman-to-Integer.md" >}})|Easy||||57.1%| @@ -30,7 +30,7 @@ weight: 2 |0093|Restore IP Addresses|[Go]({{< relref "/ChapterFour/0001~0099/0093.Restore-IP-Addresses.md" >}})|Medium| O(n)| O(n)|❤️|38.0%| |0115|Distinct Subsequences|[Go]({{< relref "/ChapterFour/0100~0199/0115.Distinct-Subsequences.md" >}})|Hard||||40.1%| |0125|Valid Palindrome|[Go]({{< relref "/ChapterFour/0100~0199/0125.Valid-Palindrome.md" >}})|Easy| O(n)| O(1)||38.6%| -|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.8%| +|0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.9%| |0151|Reverse Words in a String|[Go]({{< relref "/ChapterFour/0100~0199/0151.Reverse-Words-in-a-String.md" >}})|Medium||||24.3%| |0227|Basic Calculator II|[Go]({{< relref "/ChapterFour/0200~0299/0227.Basic-Calculator-II.md" >}})|Medium||||38.9%| |0344|Reverse String|[Go]({{< relref "/ChapterFour/0300~0399/0344.Reverse-String.md" >}})|Easy| O(n)| O(1)||70.8%| @@ -40,7 +40,7 @@ weight: 2 |0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.5%| |0541|Reverse String II|[Go]({{< relref "/ChapterFour/0500~0599/0541.Reverse-String-II.md" >}})|Easy||||49.6%| |0557|Reverse Words in a String III|[Go]({{< relref "/ChapterFour/0500~0599/0557.Reverse-Words-in-a-String-III.md" >}})|Easy||||72.5%| -|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.6%| +|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.7%| |0647|Palindromic Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0647.Palindromic-Substrings.md" >}})|Medium||||62.8%| |0696|Count Binary Substrings|[Go]({{< relref "/ChapterFour/0600~0699/0696.Count-Binary-Substrings.md" >}})|Easy||||61.2%| |0767|Reorganize String|[Go]({{< relref "/ChapterFour/0700~0799/0767.Reorganize-String.md" >}})|Medium| O(n log n)| O(log n) |❤️|50.3%| @@ -53,23 +53,23 @@ weight: 2 |1003|Check If Word Is Valid After Substitutions|[Go]({{< relref "/ChapterFour/1000~1099/1003.Check-If-Word-Is-Valid-After-Substitutions.md" >}})|Medium| O(n)| O(1)||56.7%| |1108|Defanging an IP Address|[Go]({{< relref "/ChapterFour/1100~1199/1108.Defanging-an-IP-Address.md" >}})|Easy||||88.4%| |1170|Compare Strings by Frequency of the Smallest Character|[Go]({{< relref "/ChapterFour/1100~1199/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character.md" >}})|Medium||||60.4%| -|1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1100~1199/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||62.2%| +|1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1100~1199/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||62.3%| |1221|Split a String in Balanced Strings|[Go]({{< relref "/ChapterFour/1200~1299/1221.Split-a-String-in-Balanced-Strings.md" >}})|Easy||||84.3%| |1234|Replace the Substring for Balanced String|[Go]({{< relref "/ChapterFour/1200~1299/1234.Replace-the-Substring-for-Balanced-String.md" >}})|Medium||||34.6%| |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.3%| |1332|Remove Palindromic Subsequences|[Go]({{< relref "/ChapterFour/1300~1399/1332.Remove-Palindromic-Subsequences.md" >}})|Easy||||68.4%| |1455|Check If a Word Occurs As a Prefix of Any Word in a Sentence|[Go]({{< relref "/ChapterFour/1400~1499/1455.Check-If-a-Word-Occurs-As-a-Prefix-of-Any-Word-in-a-Sentence.md" >}})|Easy||||65.4%| -|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.2%| +|1461|Check If a String Contains All Binary Codes of Size K|[Go]({{< relref "/ChapterFour/1400~1499/1461.Check-If-a-String-Contains-All-Binary-Codes-of-Size-K.md" >}})|Medium||||54.3%| |1573|Number of Ways to Split a String|[Go]({{< relref "/ChapterFour/1500~1599/1573.Number-of-Ways-to-Split-a-String.md" >}})|Medium||||31.4%| |1614|Maximum Nesting Depth of the Parentheses|[Go]({{< relref "/ChapterFour/1600~1699/1614.Maximum-Nesting-Depth-of-the-Parentheses.md" >}})|Easy||||82.7%| |1624|Largest Substring Between Two Equal Characters|[Go]({{< relref "/ChapterFour/1600~1699/1624.Largest-Substring-Between-Two-Equal-Characters.md" >}})|Easy||||58.5%| |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||51.8%| |1662|Check If Two String Arrays are Equivalent|[Go]({{< relref "/ChapterFour/1600~1699/1662.Check-If-Two-String-Arrays-are-Equivalent.md" >}})|Easy||||82.5%| |1668|Maximum Repeating Substring|[Go]({{< relref "/ChapterFour/1600~1699/1668.Maximum-Repeating-Substring.md" >}})|Easy||||38.6%| -|1678|Goal Parser Interpretation|[Go]({{< relref "/ChapterFour/1600~1699/1678.Goal-Parser-Interpretation.md" >}})|Easy||||85.2%| +|1678|Goal Parser Interpretation|[Go]({{< relref "/ChapterFour/1600~1699/1678.Goal-Parser-Interpretation.md" >}})|Easy||||85.3%| |1684|Count the Number of Consistent Strings|[Go]({{< relref "/ChapterFour/1600~1699/1684.Count-the-Number-of-Consistent-Strings.md" >}})|Easy||||81.7%| |1694|Reformat Phone Number|[Go]({{< relref "/ChapterFour/1600~1699/1694.Reformat-Phone-Number.md" >}})|Easy||||65.0%| -|1704|Determine if String Halves Are Alike|[Go]({{< relref "/ChapterFour/1700~1799/1704.Determine-if-String-Halves-Are-Alike.md" >}})|Easy||||79.1%| +|1704|Determine if String Halves Are Alike|[Go]({{< relref "/ChapterFour/1700~1799/1704.Determine-if-String-Halves-Are-Alike.md" >}})|Easy||||79.2%| |1736|Latest Time by Replacing Hidden Digits|[Go]({{< relref "/ChapterFour/1700~1799/1736.Latest-Time-by-Replacing-Hidden-Digits.md" >}})|Easy||||41.2%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index b1f3fe51..b793ea71 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -17,7 +17,7 @@ weight: 6 |0100|Same Tree|[Go]({{< relref "/ChapterFour/0100~0199/0100.Same-Tree.md" >}})|Easy| O(n)| O(1)||54.3%| |0101|Symmetric Tree|[Go]({{< relref "/ChapterFour/0100~0199/0101.Symmetric-Tree.md" >}})|Easy| O(n)| O(1)||48.6%| |0102|Binary Tree Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0102.Binary-Tree-Level-Order-Traversal.md" >}})|Medium| O(n)| O(1)||57.1%| -|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.5%| +|0103|Binary Tree Zigzag Level Order Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0103.Binary-Tree-Zigzag-Level-Order-Traversal.md" >}})|Medium| O(n)| O(n)||50.6%| |0104|Maximum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0104.Maximum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||68.5%| |0105|Construct Binary Tree from Preorder and Inorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md" >}})|Medium||||52.6%| |0106|Construct Binary Tree from Inorder and Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0106.Construct-Binary-Tree-from-Inorder-and-Postorder-Traversal.md" >}})|Medium||||50.3%| @@ -26,19 +26,19 @@ weight: 6 |0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.9%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.9%| |0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.7%| -|0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.6%| +|0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.7%| |0114|Flatten Binary Tree to Linked List|[Go]({{< relref "/ChapterFour/0100~0199/0114.Flatten-Binary-Tree-to-Linked-List.md" >}})|Medium| O(n)| O(1)||52.6%| |0124|Binary Tree Maximum Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0124.Binary-Tree-Maximum-Path-Sum.md" >}})|Hard| O(n)| O(1)||35.7%| |0129|Sum Root to Leaf Numbers|[Go]({{< relref "/ChapterFour/0100~0199/0129.Sum-Root-to-Leaf-Numbers.md" >}})|Medium| O(n)| O(1)||51.4%| -|0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||57.9%| +|0144|Binary Tree Preorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0144.Binary-Tree-Preorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.0%| |0145|Binary Tree Postorder Traversal|[Go]({{< relref "/ChapterFour/0100~0199/0145.Binary-Tree-Postorder-Traversal.md" >}})|Medium| O(n)| O(1)||58.2%| |0173|Binary Search Tree Iterator|[Go]({{< relref "/ChapterFour/0100~0199/0173.Binary-Search-Tree-Iterator.md" >}})|Medium| O(n)| O(1)||60.8%| -|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.6%| +|0199|Binary Tree Right Side View|[Go]({{< relref "/ChapterFour/0100~0199/0199.Binary-Tree-Right-Side-View.md" >}})|Medium| O(n)| O(1)||56.7%| |0222|Count Complete Tree Nodes|[Go]({{< relref "/ChapterFour/0200~0299/0222.Count-Complete-Tree-Nodes.md" >}})|Medium| O(n)| O(1)||49.9%| |0226|Invert Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0226.Invert-Binary-Tree.md" >}})|Easy| O(n)| O(1)||67.5%| |0230|Kth Smallest Element in a BST|[Go]({{< relref "/ChapterFour/0200~0299/0230.Kth-Smallest-Element-in-a-BST.md" >}})|Medium| O(n)| O(1)||63.1%| |0235|Lowest Common Ancestor of a Binary Search Tree|[Go]({{< relref "/ChapterFour/0200~0299/0235.Lowest-Common-Ancestor-of-a-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||52.2%| -|0236|Lowest Common Ancestor of a Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0236.Lowest-Common-Ancestor-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||49.5%| +|0236|Lowest Common Ancestor of a Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0236.Lowest-Common-Ancestor-of-a-Binary-Tree.md" >}})|Medium| O(n)| O(1)||49.6%| |0257|Binary Tree Paths|[Go]({{< relref "/ChapterFour/0200~0299/0257.Binary-Tree-Paths.md" >}})|Easy| O(n)| O(1)||54.2%| |0297|Serialize and Deserialize Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}})|Hard||||50.4%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.0%| @@ -66,7 +66,7 @@ weight: 6 |0897|Increasing Order Search Tree|[Go]({{< relref "/ChapterFour/0800~0899/0897.Increasing-Order-Search-Tree.md" >}})|Easy||||74.7%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||39.0%| |0971|Flip Binary Tree To Match Preorder Traversal|[Go]({{< relref "/ChapterFour/0900~0999/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal.md" >}})|Medium||||50.1%| -|0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||69.9%| +|0979|Distribute Coins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0979.Distribute-Coins-in-Binary-Tree.md" >}})|Medium||||70.0%| |0987|Vertical Order Traversal of a Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})|Hard||||39.1%| |0993|Cousins in Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0993.Cousins-in-Binary-Tree.md" >}})|Easy| O(n)| O(1)||52.3%| |1026|Maximum Difference Between Node and Ancestor|[Go]({{< relref "/ChapterFour/1000~1099/1026.Maximum-Difference-Between-Node-and-Ancestor.md" >}})|Medium||||69.8%| diff --git a/website/content/ChapterTwo/Two_Pointers.md b/website/content/ChapterTwo/Two_Pointers.md index e37692dd..b0122ab8 100644 --- a/website/content/ChapterTwo/Two_Pointers.md +++ b/website/content/ChapterTwo/Two_Pointers.md @@ -63,10 +63,10 @@ weight: 3 |0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0300~0399/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||52.2%| |0424|Longest Repeating Character Replacement|[Go]({{< relref "/ChapterFour/0400~0499/0424.Longest-Repeating-Character-Replacement.md" >}})|Medium| O(n)| O(1) ||48.5%| |0457|Circular Array Loop|[Go]({{< relref "/ChapterFour/0400~0499/0457.Circular-Array-Loop.md" >}})|Medium||||30.4%| -|0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium| O(n)| O(1) ||50.1%| +|0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium| O(n)| O(1) ||50.2%| |0532|K-diff Pairs in an Array|[Go]({{< relref "/ChapterFour/0500~0599/0532.K-diff-Pairs-in-an-Array.md" >}})|Medium| O(n)| O(n)||35.6%| |0567|Permutation in String|[Go]({{< relref "/ChapterFour/0500~0599/0567.Permutation-in-String.md" >}})|Medium| O(n)| O(1)|❤️|44.6%| -|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.6%| +|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0600~0699/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||54.7%| |0713|Subarray Product Less Than K|[Go]({{< relref "/ChapterFour/0700~0799/0713.Subarray-Product-Less-Than-K.md" >}})|Medium| O(n)| O(1)||40.6%| |0763|Partition Labels|[Go]({{< relref "/ChapterFour/0700~0799/0763.Partition-Labels.md" >}})|Medium| O(n)| O(1)|❤️|78.1%| |0826|Most Profit Assigning Work|[Go]({{< relref "/ChapterFour/0800~0899/0826.Most-Profit-Assigning-Work.md" >}})|Medium| O(n log n)| O(n)||39.4%| diff --git a/website/content/ChapterTwo/Union_Find.md b/website/content/ChapterTwo/Union_Find.md index f822163d..6c0937f6 100644 --- a/website/content/ChapterTwo/Union_Find.md +++ b/website/content/ChapterTwo/Union_Find.md @@ -26,19 +26,19 @@ weight: 16 |0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})|Medium| O(n^2)| O(n)||60.8%| |0684|Redundant Connection|[Go]({{< relref "/ChapterFour/0600~0699/0684.Redundant-Connection.md" >}})|Medium| O(n)| O(n)||59.2%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard| O(n)| O(n)||33.2%| -|0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium| O(n)| O(n)|❤️|52.4%| +|0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium| O(n)| O(n)|❤️|52.5%| |0765|Couples Holding Hands|[Go]({{< relref "/ChapterFour/0700~0799/0765.Couples-Holding-Hands.md" >}})|Hard| O(n)| O(n)|❤️|55.6%| |0778|Swim in Rising Water|[Go]({{< relref "/ChapterFour/0700~0799/0778.Swim-in-Rising-Water.md" >}})|Hard| O(n^2)| O(n)|❤️|55.0%| |0803|Bricks Falling When Hit|[Go]({{< relref "/ChapterFour/0800~0899/0803.Bricks-Falling-When-Hit.md" >}})|Hard| O(n^2)| O(n)|❤️|32.0%| |0839|Similar String Groups|[Go]({{< relref "/ChapterFour/0800~0899/0839.Similar-String-Groups.md" >}})|Hard| O(n^2)| O(n)||41.8%| |0924|Minimize Malware Spread|[Go]({{< relref "/ChapterFour/0900~0999/0924.Minimize-Malware-Spread.md" >}})|Hard| O(m\*n)| O(n)||41.9%| |0928|Minimize Malware Spread II|[Go]({{< relref "/ChapterFour/0900~0999/0928.Minimize-Malware-Spread-II.md" >}})|Hard| O(m\*n)| O(n)|❤️|41.5%| -|0947|Most Stones Removed with Same Row or Column|[Go]({{< relref "/ChapterFour/0900~0999/0947.Most-Stones-Removed-with-Same-Row-or-Column.md" >}})|Medium| O(n)| O(n)||55.6%| +|0947|Most Stones Removed with Same Row or Column|[Go]({{< relref "/ChapterFour/0900~0999/0947.Most-Stones-Removed-with-Same-Row-or-Column.md" >}})|Medium| O(n)| O(n)||55.7%| |0952|Largest Component Size by Common Factor|[Go]({{< relref "/ChapterFour/0900~0999/0952.Largest-Component-Size-by-Common-Factor.md" >}})|Hard| O(n)| O(n)|❤️|36.5%| |0959|Regions Cut By Slashes|[Go]({{< relref "/ChapterFour/0900~0999/0959.Regions-Cut-By-Slashes.md" >}})|Medium| O(n^2)| O(n^2)|❤️|67.2%| |0990|Satisfiability of Equality Equations|[Go]({{< relref "/ChapterFour/0900~0999/0990.Satisfiability-of-Equality-Equations.md" >}})|Medium| O(n)| O(n)||47.2%| |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||49.1%| -|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.6%| +|1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||55.5%| |1579|Remove Max Number of Edges to Keep Graph Fully Traversable|[Go]({{< relref "/ChapterFour/1500~1599/1579.Remove-Max-Number-of-Edges-to-Keep-Graph-Fully-Traversable.md" >}})|Hard||||46.4%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|