diff --git a/README.md b/README.md index bc3430e9..83520ac8 100755 --- a/README.md +++ b/README.md @@ -126,16 +126,16 @@ | | Easy | Medium | Hard | Total | |:--------:|:--------:|:--------:|:--------:|:--------:| -|Optimizing|36|42|16|94| +|Optimizing|36|41|16|93| |Accepted|**272**|**349**|**103**|**724**| |Total|468|945|380|1793| -|Perfection Rate|86.8%|88.0%|84.5%|87.0%| +|Perfection Rate|86.8%|88.3%|84.5%|87.2%| |Completion Rate|58.1%|36.9%|27.1%|40.4%| |------------|----------------------------|----------------------------|----------------------------|----------------------------| ## 二. 目录 -以下已经收录了 630 道题的题解,还有 12 道题在尝试优化到 beats 100% +以下已经收录了 631 道题的题解,还有 12 道题在尝试优化到 beats 100% | No. | Title | Solution | Acceptance | Difficulty | Frequency | |:--------:|:--------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:| @@ -162,7 +162,7 @@ |0021|Merge Two Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0021.Merge-Two-Sorted-Lists)|56.2%|Easy|| |0022|Generate Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0022.Generate-Parentheses)|65.5%|Medium|| |0023|Merge k Sorted Lists|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0023.Merge-k-Sorted-Lists)|42.8%|Hard|| -|0024|Swap Nodes in Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0024.Swap-Nodes-in-Pairs)|53.2%|Medium|| +|0024|Swap Nodes in Pairs|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0024.Swap-Nodes-in-Pairs)|53.3%|Medium|| |0025|Reverse Nodes in k-Group|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0025.Reverse-Nodes-in-k-Group)|45.1%|Hard|| |0026|Remove Duplicates from Sorted Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0026.Remove-Duplicates-from-Sorted-Array)|46.6%|Easy|| |0027|Remove Element|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0027.Remove-Element)|49.3%|Easy|| @@ -248,7 +248,7 @@ |0107|Binary Tree Level Order Traversal II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0107.Binary-Tree-Level-Order-Traversal-II)|55.3%|Medium|| |0108|Convert Sorted Array to Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0108.Convert-Sorted-Array-to-Binary-Search-Tree)|60.6%|Easy|| |0109|Convert Sorted List to Binary Search Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0109.Convert-Sorted-List-to-Binary-Search-Tree)|50.4%|Medium|| -|0110|Balanced Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0110.Balanced-Binary-Tree)|44.7%|Easy|| +|0110|Balanced Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0110.Balanced-Binary-Tree)|44.8%|Easy|| |0111|Minimum Depth of Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0111.Minimum-Depth-of-Binary-Tree)|39.6%|Easy|| |0112|Path Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0112.Path-Sum)|42.5%|Easy|| |0113|Path Sum II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0113.Path-Sum-II)|49.3%|Medium|| @@ -271,7 +271,7 @@ |0130|Surrounded Regions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0130.Surrounded-Regions)|29.5%|Medium|| |0131|Palindrome Partitioning|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0131.Palindrome-Partitioning)|52.3%|Medium|| |0132|Palindrome Partitioning II||31.3%|Hard|| -|0133|Clone Graph||39.4%|Medium|| +|0133|Clone Graph||39.5%|Medium|| |0134|Gas Station||41.4%|Medium|| |0135|Candy||33.2%|Hard|| |0136|Single Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0136.Single-Number)|66.6%|Easy|| @@ -314,7 +314,7 @@ |0173|Binary Search Tree Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0173.Binary-Search-Tree-Iterator)|60.3%|Medium|| |0174|Dungeon Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0174.Dungeon-Game)|33.3%|Hard|| |0175|Combine Two Tables||64.4%|Easy|| -|0176|Second Highest Salary||33.3%|Easy|| +|0176|Second Highest Salary||33.4%|Easy|| |0177|Nth Highest Salary||33.4%|Medium|| |0178|Rank Scores||50.5%|Medium|| |0179|Largest Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0179.Largest-Number)|30.7%|Medium|| @@ -348,9 +348,9 @@ |0207|Course Schedule|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0207.Course-Schedule)|44.3%|Medium|| |0208|Implement Trie (Prefix Tree)|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0208.Implement-Trie-(Prefix-Tree))|52.3%|Medium|| |0209|Minimum Size Subarray Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0209.Minimum-Size-Subarray-Sum)|39.6%|Medium|| -|0210|Course Schedule II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0210.Course-Schedule-II)|42.7%|Medium|| +|0210|Course Schedule II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0210.Course-Schedule-II)|42.8%|Medium|| |0211|Design Add and Search Words Data Structure|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0211.Design-Add-and-Search-Words-Data-Structure)|40.3%|Medium|| -|0212|Word Search II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0212.Word-Search-II)|37.2%|Hard|| +|0212|Word Search II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0212.Word-Search-II)|37.3%|Hard|| |0213|House Robber II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0213.House-Robber-II)|37.6%|Medium|| |0214|Shortest Palindrome||30.7%|Hard|| |0215|Kth Largest Element in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0215.Kth-Largest-Element-in-an-Array)|58.6%|Medium|| @@ -391,7 +391,7 @@ |0250|Count Univalue Subtrees||53.4%|Medium|| |0251|Flatten 2D Vector||46.4%|Medium|| |0252|Meeting Rooms||55.4%|Easy|| -|0253|Meeting Rooms II||46.9%|Medium|| +|0253|Meeting Rooms II||47.0%|Medium|| |0254|Factor Combinations||47.5%|Medium|| |0255|Verify Preorder Sequence in Binary Search Tree||46.2%|Medium|| |0256|Paint House||53.7%|Medium|| @@ -423,7 +423,7 @@ |0282|Expression Add Operators||36.8%|Hard|| |0283|Move Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0283.Move-Zeroes)|58.6%|Easy|| |0284|Peeking Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0284.Peeking-Iterator)|50.7%|Medium|| -|0285|Inorder Successor in BST||43.0%|Medium|| +|0285|Inorder Successor in BST||43.1%|Medium|| |0286|Walls and Gates||56.7%|Medium|| |0287|Find the Duplicate Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0287.Find-the-Duplicate-Number)|57.7%|Medium|| |0288|Unique Word Abbreviation||23.1%|Medium|| @@ -512,7 +512,7 @@ |0371|Sum of Two Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0371.Sum-of-Two-Integers)|50.6%|Medium|| |0372|Super Pow|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0372.Super-Pow)|36.7%|Medium|| |0373|Find K Pairs with Smallest Sums|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0373.Find-K-Pairs-with-Smallest-Sums)|37.8%|Medium|| -|0374|Guess Number Higher or Lower||44.7%|Easy|| +|0374|Guess Number Higher or Lower||44.8%|Easy|| |0375|Guess Number Higher or Lower II||42.3%|Medium|| |0376|Wiggle Subsequence||40.3%|Medium|| |0377|Combination Sum IV||46.1%|Medium|| @@ -572,7 +572,7 @@ |0431|Encode N-ary Tree to Binary Tree||74.7%|Hard|| |0432|All O`one Data Structure||33.2%|Hard|| |0433|Minimum Genetic Mutation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0433.Minimum-Genetic-Mutation)|43.4%|Medium|| -|0434|Number of Segments in a String||37.7%|Easy|| +|0434|Number of Segments in a String||37.8%|Easy|| |0435|Non-overlapping Intervals|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0435.Non-overlapping-Intervals)|43.9%|Medium|| |0436|Find Right Interval|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0436.Find-Right-Interval)|48.5%|Medium|| |0437|Path Sum III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0437.Path-Sum-III)|48.2%|Medium|| @@ -614,9 +614,9 @@ |0473|Matchsticks to Square||38.2%|Medium|| |0474|Ones and Zeroes|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0474.Ones-and-Zeroes)|43.8%|Medium|| |0475|Heaters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0475.Heaters)|33.7%|Medium|| -|0476|Number Complement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0476.Number-Complement)|65.2%|Easy|| +|0476|Number Complement|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0476.Number-Complement)|65.1%|Easy|| |0477|Total Hamming Distance|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0477.Total-Hamming-Distance)|50.6%|Medium|| -|0478|Generate Random Point in a Circle||38.9%|Medium|| +|0478|Generate Random Point in a Circle||39.0%|Medium|| |0479|Largest Palindrome Product||29.6%|Hard|| |0480|Sliding Window Median|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0480.Sliding-Window-Median)|38.8%|Hard|| |0481|Magical String||48.1%|Medium|| @@ -673,8 +673,8 @@ |0532|K-diff Pairs in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0532.K-diff-Pairs-in-an-Array)|35.3%|Medium|| |0533|Lonely Pixel II||48.2%|Medium|| |0534|Game Play Analysis III||79.6%|Medium|| -|0535|Encode and Decode TinyURL||81.0%|Medium|| -|0536|Construct Binary Tree from String||50.9%|Medium|| +|0535|Encode and Decode TinyURL|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0535.Encode-and-Decode-TinyURL)|81.5%|Medium|| +|0536|Construct Binary Tree from String||51.1%|Medium|| |0537|Complex Number Multiplication|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0537.Complex-Number-Multiplication)|68.3%|Medium|| |0538|Convert BST to Greater Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0538.Convert-BST-to-Greater-Tree)|59.6%|Medium|| |0539|Minimum Time Difference||52.4%|Medium|| @@ -685,9 +685,9 @@ |0544|Output Contest Matches||75.9%|Medium|| |0545|Boundary of Binary Tree||40.0%|Medium|| |0546|Remove Boxes||44.1%|Hard|| -|0547|Number of Provinces|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0547.Number-of-Provinces)|60.5%|Medium|| +|0547|Number of Provinces|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0547.Number-of-Provinces)|60.6%|Medium|| |0548|Split Array with Equal Sum||48.0%|Medium|| -|0549|Binary Tree Longest Consecutive Sequence II||47.2%|Medium|| +|0549|Binary Tree Longest Consecutive Sequence II||47.3%|Medium|| |0550|Game Play Analysis IV||45.6%|Medium|| |0551|Student Attendance Record I||46.0%|Easy|| |0552|Student Attendance Record II||37.5%|Hard|| @@ -753,7 +753,7 @@ |0612|Shortest Distance in a Plane||61.4%|Medium|| |0613|Shortest Distance in a Line||79.7%|Easy|| |0614|Second Degree Follower||32.6%|Medium|| -|0615|Average Salary: Departments VS Company||52.7%|Hard|| +|0615|Average Salary: Departments VS Company||52.8%|Hard|| |0616|Add Bold Tag in String||44.8%|Medium|| |0617|Merge Two Binary Trees||75.4%|Easy|| |0618|Students Report By Geography||60.2%|Hard|| @@ -778,7 +778,7 @@ |0637|Average of Levels in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0637.Average-of-Levels-in-Binary-Tree)|66.0%|Easy|| |0638|Shopping Offers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0638.Shopping-Offers)|53.0%|Medium|| |0639|Decode Ways II||27.6%|Hard|| -|0640|Solve the Equation||42.8%|Medium|| +|0640|Solve the Equation||42.7%|Medium|| |0641|Design Circular Deque||56.2%|Medium|| |0642|Design Search Autocomplete System||46.3%|Hard|| |0643|Maximum Average Subarray I|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0643.Maximum-Average-Subarray-I)|42.0%|Easy|| @@ -790,7 +790,7 @@ |0649|Dota2 Senate||39.5%|Medium|| |0650|2 Keys Keyboard||50.1%|Medium|| |0651|4 Keys Keyboard||53.2%|Medium|| -|0652|Find Duplicate Subtrees||52.6%|Medium|| +|0652|Find Duplicate Subtrees||52.7%|Medium|| |0653|Two Sum IV - Input is a BST|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0653.Two-Sum-IV---Input-is-a-BST)|56.3%|Easy|| |0654|Maximum Binary Tree||81.2%|Medium|| |0655|Print Binary Tree||56.2%|Medium|| @@ -811,7 +811,7 @@ |0670|Maximum Swap||45.2%|Medium|| |0671|Second Minimum Node In a Binary Tree||42.8%|Easy|| |0672|Bulb Switcher II||51.1%|Medium|| -|0673|Number of Longest Increasing Subsequence||38.5%|Medium|| +|0673|Number of Longest Increasing Subsequence||38.6%|Medium|| |0674|Longest Continuous Increasing Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0674.Longest-Continuous-Increasing-Subsequence)|46.0%|Easy|| |0675|Cut Off Trees for Golf Event||35.4%|Hard|| |0676|Implement Magic Dictionary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0676.Implement-Magic-Dictionary)|55.3%|Medium|| @@ -819,7 +819,7 @@ |0678|Valid Parenthesis String||31.7%|Medium|| |0679|24 Game||47.2%|Hard|| |0680|Valid Palindrome II||37.1%|Easy|| -|0681|Next Closest Time||45.9%|Medium|| +|0681|Next Closest Time||46.0%|Medium|| |0682|Baseball Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0682.Baseball-Game)|67.2%|Easy|| |0683|K Empty Slots||36.1%|Hard|| |0684|Redundant Connection|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0684.Redundant-Connection)|59.0%|Medium|| @@ -860,9 +860,9 @@ |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.6%|Hard|| |0720|Longest Word in Dictionary|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0720.Longest-Word-in-Dictionary)|49.3%|Easy|| |0721|Accounts Merge|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0721.Accounts-Merge)|52.0%|Medium|| -|0722|Remove Comments||36.2%|Medium|| +|0722|Remove Comments||36.3%|Medium|| |0723|Candy Crush||72.8%|Medium|| -|0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|45.7%|Easy|| +|0724|Find Pivot Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0724.Find-Pivot-Index)|45.8%|Easy|| |0725|Split Linked List in Parts|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0725.Split-Linked-List-in-Parts)|53.0%|Medium|| |0726|Number of Atoms|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0726.Number-of-Atoms)|51.0%|Hard|| |0727|Minimum Window Subsequence||42.3%|Hard|| @@ -873,7 +873,7 @@ |0732|My Calendar III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0732.My-Calendar-III)|62.0%|Hard|| |0733|Flood Fill|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0733.Flood-Fill)|55.9%|Easy|| |0734|Sentence Similarity||42.4%|Easy|| -|0735|Asteroid Collision|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0735.Asteroid-Collision)|43.2%|Medium|| +|0735|Asteroid Collision|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0735.Asteroid-Collision)|43.3%|Medium|| |0736|Parse Lisp Expression||49.7%|Hard|| |0737|Sentence Similarity II||46.6%|Medium|| |0738|Monotone Increasing Digits||45.7%|Medium|| @@ -1009,13 +1009,13 @@ |0868|Binary Gap||61.0%|Easy|| |0869|Reordered Power of 2||54.3%|Medium|| |0870|Advantage Shuffle||46.9%|Medium|| -|0871|Minimum Number of Refueling Stops||32.4%|Hard|| +|0871|Minimum Number of Refueling Stops||32.3%|Hard|| |0872|Leaf-Similar Trees|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0872.Leaf-Similar-Trees)|64.5%|Easy|| |0873|Length of Longest Fibonacci Subsequence||48.2%|Medium|| |0874|Walking Robot Simulation||36.8%|Easy|| |0875|Koko Eating Bananas|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0875.Koko-Eating-Bananas)|53.5%|Medium|| |0876|Middle of the Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0876.Middle-of-the-Linked-List)|69.2%|Easy|| -|0877|Stone Game||66.9%|Medium|| +|0877|Stone Game||67.0%|Medium|| |0878|Nth Magical Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0878.Nth-Magical-Number)|28.8%|Hard|| |0879|Profitable Schemes||39.9%|Hard|| |0880|Decoded String at Index|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0880.Decoded-String-at-Index)|28.2%|Medium|| @@ -1126,21 +1126,21 @@ |0985|Sum of Even Numbers After Queries|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0985.Sum-of-Even-Numbers-After-Queries)|60.7%|Easy|| |0986|Interval List Intersections|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0986.Interval-List-Intersections)|68.4%|Medium|| |0987|Vertical Order Traversal of a Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0987.Vertical-Order-Traversal-of-a-Binary-Tree)|38.9%|Hard|| -|0988|Smallest String Starting From Leaf||46.7%|Medium|| +|0988|Smallest String Starting From Leaf||46.8%|Medium|| |0989|Add to Array-Form of Integer|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0989.Add-to-Array-Form-of-Integer)|44.9%|Easy|| |0990|Satisfiability of Equality Equations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0990.Satisfiability-of-Equality-Equations)|46.9%|Medium|| |0991|Broken Calculator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0991.Broken-Calculator)|49.7%|Medium|| |0992|Subarrays with K Different Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0992.Subarrays-with-K-Different-Integers)|50.7%|Hard|| |0993|Cousins in Binary Tree|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0993.Cousins-in-Binary-Tree)|52.3%|Easy|| |0994|Rotting Oranges||49.6%|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)|49.9%|Hard|| +|0995|Minimum Number of K Consecutive Bit Flips|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0995.Minimum-Number-of-K-Consecutive-Bit-Flips)|50.0%|Hard|| |0996|Number of Squareful Arrays|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0996.Number-of-Squareful-Arrays)|48.5%|Hard|| |0997|Find the Town Judge||49.8%|Easy|| |0998|Maximum Binary Tree II||64.0%|Medium|| |0999|Available Captures for Rook|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0999.Available-Captures-for-Rook)|67.8%|Easy|| |1000|Minimum Cost to Merge Stones||40.5%|Hard|| |1001|Grid Illumination||36.4%|Hard|| -|1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.6%|Easy|| +|1002|Find Common Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1002.Find-Common-Characters)|68.7%|Easy|| |1003|Check If Word Is Valid After Substitutions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1003.Check-If-Word-Is-Valid-After-Substitutions)|56.5%|Medium|| |1004|Max Consecutive Ones III|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1004.Max-Consecutive-Ones-III)|60.9%|Medium|| |1005|Maximize Sum Of Array After K Negations|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1005.Maximize-Sum-Of-Array-After-K-Negations)|52.3%|Easy|| @@ -1185,7 +1185,7 @@ |1044|Longest Duplicate Substring||31.4%|Hard|| |1045|Customers Who Bought All Products||68.4%|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)|70.9%|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.0%|Easy|| |1048|Longest String Chain||55.5%|Medium|| |1049|Last Stone Weight II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1049.Last-Stone-Weight-II)|45.5%|Medium|| |1050|Actors and Directors Who Cooperated At Least Three Times||72.4%|Easy|| @@ -1199,7 +1199,7 @@ |1058|Minimize Rounding Error to Meet Target||43.5%|Medium|| |1059|All Paths from Source Lead to Destination||42.9%|Medium|| |1060|Missing Element in Sorted Array||54.8%|Medium|| -|1061|Lexicographically Smallest Equivalent String||66.7%|Medium|| +|1061|Lexicographically Smallest Equivalent String||66.8%|Medium|| |1062|Longest Repeating Substring||58.3%|Medium|| |1063|Number of Valid Subarrays||72.1%|Hard|| |1064|Fixed Point||64.9%|Easy|| @@ -1215,7 +1215,7 @@ |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)|61.8%|Hard|| |1075|Project Employees I||66.1%|Easy|| |1076|Project Employees II||52.9%|Easy|| -|1077|Project Employees III||77.8%|Medium|| +|1077|Project Employees III||77.7%|Medium|| |1078|Occurrences After Bigram|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1078.Occurrences-After-Bigram)|64.9%|Easy|| |1079|Letter Tile Possibilities|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1079.Letter-Tile-Possibilities)|75.9%|Medium|| |1080|Insufficient Nodes in Root to Leaf Paths||50.0%|Medium|| @@ -1226,7 +1226,7 @@ |1085|Sum of Digits in the Minimum Number||75.1%|Easy|| |1086|High Five||77.6%|Easy|| |1087|Brace Expansion||63.1%|Medium|| -|1088|Confusing Number II||45.5%|Hard|| +|1088|Confusing Number II||45.6%|Hard|| |1089|Duplicate Zeros|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1089.Duplicate-Zeros)|51.7%|Easy|| |1090|Largest Values From Labels||60.0%|Medium|| |1091|Shortest Path in Binary Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1091.Shortest-Path-in-Binary-Matrix)|40.0%|Medium|| @@ -1297,7 +1297,7 @@ |1156|Swap For Longest Repeated Character Substring||47.1%|Medium|| |1157|Online Majority Element In Subarray|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1157.Online-Majority-Element-In-Subarray)|39.8%|Hard|| |1158|Market Analysis I||64.0%|Medium|| -|1159|Market Analysis II||55.9%|Hard|| +|1159|Market Analysis II||56.0%|Hard|| |1160|Find Words That Can Be Formed by Characters|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1160.Find-Words-That-Can-Be-Formed-by-Characters)|67.9%|Easy|| |1161|Maximum Level Sum of a Binary Tree||69.3%|Medium|| |1162|As Far from Land as Possible||45.5%|Medium|| @@ -1309,13 +1309,13 @@ |1168|Optimize Water Distribution in a Village||61.1%|Hard|| |1169|Invalid Transactions||30.9%|Medium|| |1170|Compare Strings by Frequency of the Smallest Character|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1170.Compare-Strings-by-Frequency-of-the-Smallest-Character)|59.9%|Medium|| -|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List)|41.5%|Medium|| +|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.7%|Hard|| |1173|Immediate Food Delivery I||82.6%|Easy|| |1174|Immediate Food Delivery II||61.9%|Medium|| |1175|Prime Arrangements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1175.Prime-Arrangements)|52.0%|Easy|| |1176|Diet Plan Performance||53.8%|Easy|| -|1177|Can Make Palindrome from Substring||36.0%|Medium|| +|1177|Can Make Palindrome from Substring||36.1%|Medium|| |1178|Number of Valid Words for Each Puzzle|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1178.Number-of-Valid-Words-for-Each-Puzzle)|39.4%|Hard|| |1179|Reformat Department Table||82.0%|Easy|| |1180|Count Substrings with Only One Distinct Letter||77.6%|Easy|| @@ -1331,7 +1331,7 @@ |1190|Reverse Substrings Between Each Pair of Parentheses||64.1%|Medium|| |1191|K-Concatenation Maximum Sum||25.2%|Medium|| |1192|Critical Connections in a Network||50.2%|Hard|| -|1193|Monthly Transactions I||69.0%|Medium|| +|1193|Monthly Transactions I||69.1%|Medium|| |1194|Tournament Winners||52.3%|Hard|| |1195|Fizz Buzz Multithreaded||70.7%|Medium|| |1196|How Many Apples Can You Put into the Basket||68.1%|Easy|| @@ -1361,13 +1361,13 @@ |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|| -|1223|Dice Roll Simulation||46.6%|Hard|| +|1223|Dice Roll Simulation||46.7%|Hard|| |1224|Maximum Equal Frequency||35.1%|Hard|| |1225|Report Contiguous Dates||62.9%|Hard|| |1226|The Dining Philosophers||59.6%|Medium|| |1227|Airplane Seat Assignment Probability||62.2%|Medium|| |1228|Missing Number In Arithmetic Progression||51.2%|Easy|| -|1229|Meeting Scheduler||54.4%|Medium|| +|1229|Meeting Scheduler||54.3%|Medium|| |1230|Toss Strange Coins||50.4%|Medium|| |1231|Divide Chocolate||53.6%|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.4%|Easy|| @@ -1393,7 +1393,7 @@ |1252|Cells with Odd Values in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1252.Cells-with-Odd-Values-in-a-Matrix)|78.8%|Easy|| |1253|Reconstruct a 2-Row Binary Matrix||41.7%|Medium|| |1254|Number of Closed Islands|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1254.Number-of-Closed-Islands)|61.7%|Medium|| -|1255|Maximum Score Words Formed by Letters||70.1%|Hard|| +|1255|Maximum Score Words Formed by Letters||70.0%|Hard|| |1256|Encode Number||68.0%|Medium|| |1257|Smallest Common Region||61.1%|Medium|| |1258|Synonymous Sentences||63.0%|Medium|| @@ -1410,7 +1410,7 @@ |1269|Number of Ways to Stay in the Same Place After Some Steps||43.2%|Hard|| |1270|All People Report to the Given Manager||88.2%|Medium|| |1271|Hexspeak||55.4%|Easy|| -|1272|Remove Interval||58.2%|Medium|| +|1272|Remove Interval||58.3%|Medium|| |1273|Delete Tree Nodes||62.1%|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|| @@ -1434,7 +1434,7 @@ |1293|Shortest Path in a Grid with Obstacles Elimination||43.1%|Hard|| |1294|Weather Type in Each Country||66.5%|Easy|| |1295|Find Numbers with Even Number of Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1295.Find-Numbers-with-Even-Number-of-Digits)|78.9%|Easy|| -|1296|Divide Array in Sets of K Consecutive Numbers||55.5%|Medium|| +|1296|Divide Array in Sets of K Consecutive Numbers||55.6%|Medium|| |1297|Maximum Number of Occurrences of a Substring||50.3%|Medium|| |1298|Maximum Candies You Can Get from Boxes||59.8%|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|| @@ -1459,7 +1459,7 @@ |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.5%|Medium|| |1320|Minimum Distance to Type a Word Using Two Fingers||61.8%|Hard|| -|1321|Restaurant Growth||71.3%|Medium|| +|1321|Restaurant Growth||71.4%|Medium|| |1322|Ads Performance||58.1%|Easy|| |1323|Maximum 69 Number||77.9%|Easy|| |1324|Print Words Vertically||58.9%|Medium|| @@ -1479,14 +1479,14 @@ |1338|Reduce Array Size to The Half||67.7%|Medium|| |1339|Maximum Product of Splitted Binary Tree||38.3%|Medium|| |1340|Jump Game V||59.3%|Hard|| -|1341|Movie Rating||58.8%|Medium|| +|1341|Movie Rating||58.9%|Medium|| |1342|Number of Steps to Reduce a Number to Zero||85.8%|Easy|| |1343|Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold||64.8%|Medium|| |1344|Angle Between Hands of a Clock||61.3%|Medium|| |1345|Jump Game IV||42.0%|Hard|| |1346|Check If N and Its Double Exist||36.1%|Easy|| |1347|Minimum Number of Steps to Make Two Strings Anagram||75.1%|Medium|| -|1348|Tweet Counts Per Frequency||36.3%|Medium|| +|1348|Tweet Counts Per Frequency||36.4%|Medium|| |1349|Maximum Students Taking Exam||44.2%|Hard|| |1350|Students With Invalid Departments||90.3%|Easy|| |1351|Count Negative Numbers in a Sorted Matrix||75.9%|Easy|| @@ -1518,7 +1518,7 @@ |1377|Frog Position After T Seconds||35.2%|Hard|| |1378|Replace Employee ID With The Unique Identifier||90.1%|Easy|| |1379|Find a Corresponding Node of a Binary Tree in a Clone of That Tree||84.6%|Medium|| -|1380|Lucky Numbers in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1380.Lucky-Numbers-in-a-Matrix)|70.6%|Easy|| +|1380|Lucky Numbers in a Matrix|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1380.Lucky-Numbers-in-a-Matrix)|70.5%|Easy|| |1381|Design a Stack With Increment Operation||76.2%|Medium|| |1382|Balance a Binary Search Tree||76.1%|Medium|| |1383|Maximum Performance of a Team||35.8%|Hard|| @@ -1533,7 +1533,7 @@ |1392|Longest Happy Prefix||41.9%|Hard|| |1393|Capital Gain/Loss||90.9%|Medium|| |1394|Find Lucky Integer in an Array||63.2%|Easy|| -|1395|Count Number of Teams||76.5%|Medium|| +|1395|Count Number of Teams||76.4%|Medium|| |1396|Design Underground System||69.8%|Medium|| |1397|Find All Good Strings||38.6%|Hard|| |1398|Customers Who Bought Products A and B but Not C||82.0%|Medium|| @@ -1549,21 +1549,21 @@ |1408|String Matching in an Array||63.3%|Easy|| |1409|Queries on a Permutation With Key||81.6%|Medium|| |1410|HTML Entity Parser||54.3%|Medium|| -|1411|Number of Ways to Paint N × 3 Grid||60.5%|Hard|| +|1411|Number of Ways to Paint N × 3 Grid||60.4%|Hard|| |1412|Find the Quiet Students in All Exams||64.0%|Hard|| -|1413|Minimum Value to Get Positive Step by Step Sum||65.5%|Easy|| +|1413|Minimum Value to Get Positive Step by Step Sum||65.6%|Easy|| |1414|Find the Minimum Number of Fibonacci Numbers Whose Sum Is K||63.2%|Medium|| |1415|The k-th Lexicographical String of All Happy Strings of Length n||69.9%|Medium|| |1416|Restore The Array||36.6%|Hard|| -|1417|Reformat The String||55.3%|Easy|| +|1417|Reformat The String||55.4%|Easy|| |1418|Display Table of Food Orders in a Restaurant||69.0%|Medium|| |1419|Minimum Number of Frogs Croaking||47.5%|Medium|| |1420|Build Array Where You Can Find The Maximum Exactly K Comparisons||64.1%|Hard|| |1421|NPV Queries||82.2%|Medium|| -|1422|Maximum Score After Splitting a String||56.3%|Easy|| +|1422|Maximum Score After Splitting a String||56.4%|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)|46.7%|Medium|| |1424|Diagonal Traverse II||46.1%|Medium|| -|1425|Constrained Subsequence Sum||44.9%|Hard|| +|1425|Constrained Subsequence Sum||45.0%|Hard|| |1426|Counting Elements||59.1%|Easy|| |1427|Perform String Shifts||53.5%|Easy|| |1428|Leftmost Column with at Least a One||49.2%|Medium|| @@ -1580,7 +1580,7 @@ |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.1%|Hard|| |1440|Evaluate Boolean Expression||74.9%|Medium|| |1441|Build an Array With Stack Operations||70.3%|Easy|| -|1442|Count Triplets That Can Form Two Arrays of Equal XOR||71.5%|Medium|| +|1442|Count Triplets That Can Form Two Arrays of Equal XOR||71.6%|Medium|| |1443|Minimum Time to Collect All Apples in a Tree||54.6%|Medium|| |1444|Number of Ways of Cutting a Pizza||53.9%|Hard|| |1445|Apples & Oranges||90.7%|Medium|| @@ -1589,7 +1589,7 @@ |1448|Count Good Nodes in Binary Tree||71.0%|Medium|| |1449|Form Largest Integer With Digits That Add up to Target||44.2%|Hard|| |1450|Number of Students Doing Homework at a Given Time||77.1%|Easy|| -|1451|Rearrange Words in a Sentence||59.7%|Medium|| +|1451|Rearrange Words in a Sentence||59.6%|Medium|| |1452|People Whose List of Favorite Companies Is Not a Subset of Another List||55.1%|Medium|| |1453|Maximum Number of Darts Inside of a Circular Dartboard||35.4%|Hard|| |1454|Active Users||38.8%|Medium|| @@ -1599,14 +1599,14 @@ |1458|Max Dot Product of Two Subsequences||43.2%|Hard|| |1459|Rectangles Area||65.0%|Medium|| |1460|Make Two Arrays Equal by Reversing Sub-arrays||72.1%|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.5%|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.4%|Medium|| |1462|Course Schedule IV||44.7%|Medium|| |1463|Cherry Pickup II|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1463.Cherry-Pickup-II)|69.0%|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.2%|Easy|| +|1464|Maximum Product of Two Elements in an Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1464.Maximum-Product-of-Two-Elements-in-an-Array)|77.1%|Easy|| |1465|Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts||33.3%|Medium|| |1466|Reorder Routes to Make All Paths Lead to the City Zero||61.8%|Medium|| |1467|Probability of a Two Boxes Having The Same Number of Distinct Balls||60.9%|Hard|| -|1468|Calculate Salaries||82.0%|Medium|| +|1468|Calculate Salaries||82.1%|Medium|| |1469|Find All The Lonely Nodes||80.4%|Easy|| |1470|Shuffle the Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1470.Shuffle-the-Array)|88.2%|Easy|| |1471|The k Strongest Values in an Array||58.4%|Medium|| @@ -1617,7 +1617,7 @@ |1476|Subrectangle Queries||88.2%|Medium|| |1477|Find Two Non-overlapping Sub-arrays Each With Target Sum||34.7%|Medium|| |1478|Allocate Mailboxes||54.0%|Hard|| -|1479|Sales by Day of the Week||83.3%|Hard|| +|1479|Sales by Day of the Week||83.2%|Hard|| |1480|Running Sum of 1d Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1480.Running-Sum-of-1d-Array)|88.9%|Easy|| |1481|Least Number of Unique Integers after K Removals||56.0%|Medium|| |1482|Minimum Number of Days to Make m Bouquets||50.4%|Medium|| @@ -1630,7 +1630,7 @@ |1489|Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree||51.4%|Hard|| |1490|Clone N-ary Tree||83.4%|Medium|| |1491|Average Salary Excluding the Minimum and Maximum Salary||68.5%|Easy|| -|1492|The kth Factor of n||63.3%|Medium|| +|1492|The kth Factor of n||63.2%|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|| @@ -1638,7 +1638,7 @@ |1497|Check If Array Pairs Are Divisible by k||40.4%|Medium|| |1498|Number of Subsequences That Satisfy the Given Sum Condition||38.5%|Medium|| |1499|Max Value of Equation||44.9%|Hard|| -|1500|Design a File Sharing System||46.1%|Medium|| +|1500|Design a File Sharing System||46.7%|Medium|| |1501|Countries You Can Safely Invest In||60.6%|Medium|| |1502|Can Make Arithmetic Progression From Sequence||71.0%|Easy|| |1503|Last Moment Before All Ants Fall Out of a Plank||53.2%|Medium|| @@ -1660,15 +1660,15 @@ |1519|Number of Nodes in the Sub-Tree With the Same Label||37.1%|Medium|| |1520|Maximum Number of Non-Overlapping Substrings||36.3%|Hard|| |1521|Find a Value of a Mysterious Function Closest to Target||44.3%|Hard|| -|1522|Diameter of N-Ary Tree||69.0%|Medium|| +|1522|Diameter of N-Ary Tree||68.9%|Medium|| |1523|Count Odd Numbers in an Interval Range||54.5%|Easy|| |1524|Number of Sub-arrays With Odd Sum||40.0%|Medium|| |1525|Number of Good Ways to Split a String||66.5%|Medium|| |1526|Minimum Number of Increments on Subarrays to Form a Target Array||60.0%|Hard|| |1527|Patients With a Condition||65.3%|Easy|| -|1528|Shuffle String||85.6%|Easy|| +|1528|Shuffle String||85.7%|Easy|| |1529|Bulb Switcher IV||70.9%|Medium|| -|1530|Number of Good Leaf Nodes Pairs||56.2%|Medium|| +|1530|Number of Good Leaf Nodes Pairs||56.3%|Medium|| |1531|String Compression II||33.9%|Hard|| |1532|The Most Recent Three Orders||72.9%|Medium|| |1533|Find the Index of the Large Integer||54.6%|Medium|| @@ -1676,7 +1676,7 @@ |1535|Find the Winner of an Array Game||47.6%|Medium|| |1536|Minimum Swaps to Arrange a Binary Grid||43.5%|Medium|| |1537|Get the Maximum Score||36.4%|Hard|| -|1538|Guess the Majority in a Hidden Array||61.0%|Medium|| +|1538|Guess the Majority in a Hidden Array||60.9%|Medium|| |1539|Kth Missing Positive Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1539.Kth-Missing-Positive-Number)|55.0%|Easy|| |1540|Can Convert String in K Moves||31.0%|Medium|| |1541|Minimum Insertions to Balance a Parentheses String||42.8%|Medium|| @@ -1690,15 +1690,15 @@ |1549|The Most Recent Orders for Each Product||66.7%|Medium|| |1550|Three Consecutive Odds||64.6%|Easy|| |1551|Minimum Operations to Make Array Equal||77.8%|Medium|| -|1552|Magnetic Force Between Two Balls||49.0%|Medium|| -|1553|Minimum Number of Days to Eat N Oranges||29.7%|Hard|| +|1552|Magnetic Force Between Two Balls||48.9%|Medium|| +|1553|Minimum Number of Days to Eat N Oranges||29.8%|Hard|| |1554|Strings Differ by One Character||63.5%|Medium|| |1555|Bank Account Summary||52.7%|Medium|| |1556|Thousand Separator||57.4%|Easy|| |1557|Minimum Number of Vertices to Reach All Nodes||75.5%|Medium|| |1558|Minimum Numbers of Function Calls to Make Target Array||63.4%|Medium|| |1559|Detect Cycles in 2D Grid||44.5%|Hard|| -|1560|Most Visited Sector in a Circular Track||57.0%|Easy|| +|1560|Most Visited Sector in a Circular Track||56.9%|Easy|| |1561|Maximum Number of Coins You Can Get||77.5%|Medium|| |1562|Find Latest Group of Size M||39.5%|Medium|| |1563|Stone Game V||39.9%|Hard|| @@ -1709,7 +1709,7 @@ |1568|Minimum Number of Days to Disconnect Island||50.1%|Hard|| |1569|Number of Ways to Reorder Array to Get Same BST||50.0%|Hard|| |1570|Dot Product of Two Sparse Vectors||91.2%|Medium|| -|1571|Warehouse Manager||89.8%|Easy|| +|1571|Warehouse Manager||89.7%|Easy|| |1572|Matrix Diagonal Sum||77.8%|Easy|| |1573|Number of Ways to Split a String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1573.Number-of-Ways-to-Split-a-String)|31.3%|Medium|| |1574|Shortest Subarray to be Removed to Make Array Sorted||33.5%|Medium|| @@ -1722,46 +1722,46 @@ |1581|Customer Who Visited but Did Not Make Any Transactions||89.6%|Easy|| |1582|Special Positions in a Binary Matrix||64.4%|Easy|| |1583|Count Unhappy Friends||54.6%|Medium|| -|1584|Min Cost to Connect All Points||52.3%|Medium|| +|1584|Min Cost to Connect All Points||52.4%|Medium|| |1585|Check If String Is Transformable With Substring Sort Operations||48.3%|Hard|| |1586|Binary Search Tree Iterator II||66.6%|Medium|| |1587|Bank Account Summary II||89.9%|Easy|| -|1588|Sum of All Odd Length Subarrays||81.6%|Easy|| +|1588|Sum of All Odd Length Subarrays||81.5%|Easy|| |1589|Maximum Sum Obtained of Any Permutation||34.8%|Medium|| -|1590|Make Sum Divisible by P||27.0%|Medium|| +|1590|Make Sum Divisible by P||26.9%|Medium|| |1591|Strange Printer II||55.0%|Hard|| |1592|Rearrange Spaces Between Words||43.7%|Easy|| |1593|Split a String Into the Max Number of Unique Substrings||49.4%|Medium|| |1594|Maximum Non Negative Product in a Matrix||31.8%|Medium|| |1595|Minimum Cost to Connect Two Groups of Points||43.3%|Hard|| -|1596|The Most Frequently Ordered Products for Each Customer||84.9%|Medium|| +|1596|The Most Frequently Ordered Products for Each Customer||84.8%|Medium|| |1597|Build Binary Expression Tree From Infix Expression||60.1%|Hard|| |1598|Crawler Log Folder||63.9%|Easy|| |1599|Maximum Profit of Operating a Centennial Wheel||43.7%|Medium|| |1600|Throne Inheritance||60.5%|Medium|| |1601|Maximum Number of Achievable Transfer Requests||47.8%|Hard|| -|1602|Find Nearest Right Node in Binary Tree||73.8%|Medium|| -|1603|Design Parking System|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1603.Design-Parking-System)|86.3%|Easy|| +|1602|Find Nearest Right Node in Binary Tree||73.7%|Medium|| +|1603|Design Parking System|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1603.Design-Parking-System)|86.2%|Easy|| |1604|Alert Using Same Key-Card Three or More Times in a One Hour Period||42.7%|Medium|| -|1605|Find Valid Matrix Given Row and Column Sums||77.2%|Medium|| +|1605|Find Valid Matrix Given Row and Column Sums||77.3%|Medium|| |1606|Find Servers That Handled Most Number of Requests||37.2%|Hard|| -|1607|Sellers With No Sales||55.4%|Easy|| -|1608|Special Array With X Elements Greater Than or Equal X|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1608.Special-Array-With-X-Elements-Greater-Than-or-Equal-X)|61.4%|Easy|| +|1607|Sellers With No Sales||55.3%|Easy|| +|1608|Special Array With X Elements Greater Than or Equal X|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1608.Special-Array-With-X-Elements-Greater-Than-or-Equal-X)|61.3%|Easy|| |1609|Even Odd Tree||52.5%|Medium|| |1610|Maximum Number of Visible Points||30.0%|Hard|| |1611|Minimum One Bit Operations to Make Integers Zero||57.2%|Hard|| |1612|Check If Two Expression Trees are Equivalent||69.9%|Medium|| -|1613|Find the Missing IDs||74.1%|Medium|| +|1613|Find the Missing IDs||74.0%|Medium|| |1614|Maximum Nesting Depth of the Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1614.Maximum-Nesting-Depth-of-the-Parentheses)|82.8%|Easy|| |1615|Maximal Network Rank||52.4%|Medium|| -|1616|Split Two Strings to Make Palindrome||36.2%|Medium|| +|1616|Split Two Strings to Make Palindrome||36.1%|Medium|| |1617|Count Subtrees With Max Distance Between Cities||63.2%|Hard|| -|1618|Maximum Font to Fit a Sentence in a Screen||56.4%|Medium|| +|1618|Maximum Font to Fit a Sentence in a Screen||56.6%|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.9%|Easy|| |1620|Coordinate With Maximum Network Quality||37.1%|Medium|| |1621|Number of Sets of K Non-Overlapping Line Segments||41.2%|Medium|| |1622|Fancy Sequence||15.0%|Hard|| -|1623|All Valid Triplets That Can Represent a Country||88.6%|Easy|| +|1623|All Valid Triplets That Can Represent a Country||88.7%|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.7%|Easy|| |1625|Lexicographically Smallest String After Applying Operations||64.3%|Medium|| |1626|Best Team With No Conflicts||38.2%|Medium|| @@ -1769,30 +1769,30 @@ |1628|Design an Expression Tree With Evaluate Function||80.6%|Medium|| |1629|Slowest Key|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1629.Slowest-Key)|59.1%|Easy|| |1630|Arithmetic Subarrays||77.5%|Medium|| -|1631|Path With Minimum Effort|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1631.Path-With-Minimum-Effort)|50.1%|Medium|| +|1631|Path With Minimum Effort|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1631.Path-With-Minimum-Effort)|50.0%|Medium|| |1632|Rank Transform of a Matrix||30.8%|Hard|| |1633|Percentage of Users Attended a Contest||71.0%|Easy|| |1634|Add Two Polynomials Represented as Linked Lists||55.2%|Medium|| -|1635|Hopper Company Queries I||55.8%|Hard|| -|1636|Sort Array by Increasing Frequency|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1636.Sort-Array-by-Increasing-Frequency)|66.8%|Easy|| +|1635|Hopper Company Queries I||55.7%|Hard|| +|1636|Sort Array by Increasing Frequency|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1636.Sort-Array-by-Increasing-Frequency)|66.9%|Easy|| |1637|Widest Vertical Area Between Two Points Containing No Points||83.6%|Medium|| |1638|Count Substrings That Differ by One Character||69.6%|Medium|| |1639|Number of Ways to Form a Target String Given a Dictionary||39.8%|Hard|| |1640|Check Array Formation Through Concatenation|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1640.Check-Array-Formation-Through-Concatenation)|59.9%|Easy|| -|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|76.2%|Medium|| +|1641|Count Sorted Vowel Strings|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1641.Count-Sorted-Vowel-Strings)|76.1%|Medium|| |1642|Furthest Building You Can Reach||50.3%|Medium|| |1643|Kth Smallest Instructions||44.0%|Hard|| |1644|Lowest Common Ancestor of a Binary Tree II||56.4%|Medium|| -|1645|Hopper Company Queries II||37.9%|Hard|| +|1645|Hopper Company Queries II||38.0%|Hard|| |1646|Get Maximum in Generated Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1646.Get-Maximum-in-Generated-Array)|53.3%|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)|54.7%|Medium|| |1648|Sell Diminishing-Valued Colored Balls|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1648.Sell-Diminishing-Valued-Colored-Balls)|30.5%|Medium|| |1649|Create Sorted Array through Instructions|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1649.Create-Sorted-Array-through-Instructions)|36.4%|Hard|| |1650|Lowest Common Ancestor of a Binary Tree III||76.4%|Medium|| -|1651|Hopper Company Queries III||65.9%|Hard|| +|1651|Hopper Company Queries III||66.0%|Hard|| |1652|Defuse the Bomb|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1652.Defuse-the-Bomb)|62.4%|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.4%|Medium|| -|1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|25.6%|Medium|| +|1654|Minimum Jumps to Reach Home|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1654.Minimum-Jumps-to-Reach-Home)|25.5%|Medium|| |1655|Distribute Repeating Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1655.Distribute-Repeating-Integers)|40.0%|Hard|| |1656|Design an Ordered Stream|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1656.Design-an-Ordered-Stream)|82.0%|Easy|| |1657|Determine if Two Strings Are Close|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1657.Determine-if-Two-Strings-Are-Close)|55.3%|Medium|| @@ -1802,7 +1802,7 @@ |1661|Average Time of Process per Machine||79.3%|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.8%|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.0%|Medium|| +|1664|Ways to Make a Fair Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1664.Ways-to-Make-a-Fair-Array)|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)|65.8%|Hard|| |1666|Change the Root of a Binary Tree||67.6%|Medium|| |1667|Fix Names in a Table||63.0%|Easy|| @@ -1828,25 +1828,25 @@ |1687|Delivering Boxes from Storage to Ports||34.9%|Hard|| |1688|Count of Matches in Tournament|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1688.Count-of-Matches-in-Tournament)|81.5%|Easy|| |1689|Partitioning Into Minimum Number Of Deci-Binary Numbers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1689.Partitioning-Into-Minimum-Number-Of-Deci-Binary-Numbers)|87.2%|Medium|| -|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|48.4%|Medium|| +|1690|Stone Game VII|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1690.Stone-Game-VII)|48.5%|Medium|| |1691|Maximum Height by Stacking Cuboids|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1691.Maximum-Height-by-Stacking-Cuboids)|50.1%|Hard|| |1692|Count Ways to Distribute Candies||62.4%|Hard|| |1693|Daily Leads and Partners||90.9%|Easy|| |1694|Reformat Phone Number|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1694.Reformat-Phone-Number)|65.7%|Easy|| -|1695|Maximum Erasure Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1695.Maximum-Erasure-Value)|49.6%|Medium|| +|1695|Maximum Erasure Value|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1695.Maximum-Erasure-Value)|49.5%|Medium|| |1696|Jump Game VI|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1696.Jump-Game-VI)|52.8%|Medium|| -|1697|Checking Existence of Edge Length Limited Paths||54.5%|Hard|| +|1697|Checking Existence of Edge Length Limited Paths||54.6%|Hard|| |1698|Number of Distinct Substrings in a String||60.2%|Medium|| |1699|Number of Calls Between Two Persons||86.5%|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)|68.1%|Easy|| |1701|Average Waiting Time||61.5%|Medium|| |1702|Maximum Binary String After Change||60.0%|Medium|| -|1703|Minimum Adjacent Swaps for K Consecutive Ones||39.8%|Hard|| +|1703|Minimum Adjacent Swaps for K Consecutive Ones||39.7%|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)|77.0%|Easy|| |1705|Maximum Number of Eaten Apples||42.0%|Medium|| |1706|Where Will the Ball Fall||60.0%|Medium|| |1707|Maximum XOR With an Element From Array||46.8%|Hard|| -|1708|Largest Subarray Length K||63.1%|Easy|| +|1708|Largest Subarray Length K||63.2%|Easy|| |1709|Biggest Window Between Visits||82.5%|Medium|| |1710|Maximum Units on a Truck|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1710.Maximum-Units-on-a-Truck)|70.3%|Easy|| |1711|Count Good Meals||26.0%|Medium|| @@ -1859,25 +1859,25 @@ |1718|Construct the Lexicographically Largest Valid Sequence||46.4%|Medium|| |1719|Number Of Ways To Reconstruct A Tree||39.7%|Hard|| |1720|Decode XORed Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1720.Decode-XORed-Array)|85.3%|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)|68.2%|Medium|| +|1721|Swapping Nodes in a Linked List|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1721.Swapping-Nodes-in-a-Linked-List)|68.4%|Medium|| |1722|Minimize Hamming Distance After Swap Operations||54.5%|Medium|| -|1723|Find Minimum Time to Finish All Jobs||43.7%|Hard|| +|1723|Find Minimum Time to Finish All Jobs||43.8%|Hard|| |1724|Checking Existence of Edge Length Limited Paths II||56.5%|Hard|| |1725|Number Of Rectangles That Can Form The Largest Square|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1725.Number-Of-Rectangles-That-Can-Form-The-Largest-Square)|77.8%|Easy|| |1726|Tuple with Same Product||56.2%|Medium|| -|1727|Largest Submatrix With Rearrangements||58.5%|Medium|| +|1727|Largest Submatrix With Rearrangements||58.4%|Medium|| |1728|Cat and Mouse II||41.0%|Hard|| -|1729|Find Followers Count||71.8%|Easy|| -|1730|Shortest Path to Get Food||56.7%|Medium|| +|1729|Find Followers Count||71.9%|Easy|| +|1730|Shortest Path to Get Food||56.5%|Medium|| |1731|The Number of Employees Which Report to Each Employee||49.4%|Easy|| |1732|Find the Highest Altitude|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1732.Find-the-Highest-Altitude)|80.5%|Easy|| |1733|Minimum Number of People to Teach||37.3%|Medium|| -|1734|Decode XORed Permutation||52.5%|Medium|| +|1734|Decode XORed Permutation||52.6%|Medium|| |1735|Count Ways to Make Array With Product||48.0%|Hard|| |1736|Latest Time by Replacing Hidden Digits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1736.Latest-Time-by-Replacing-Hidden-Digits)|41.1%|Easy|| |1737|Change Minimum Characters to Satisfy One of Three Conditions||29.6%|Medium|| |1738|Find Kth Largest XOR Coordinate Value||62.1%|Medium|| -|1739|Building Boxes||49.5%|Hard|| +|1739|Building Boxes||49.6%|Hard|| |1740|Find Distance in a Binary Tree||68.6%|Medium|| |1741|Find Total Time Spent by Each Employee||91.0%|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)|74.5%|Easy|| @@ -1885,53 +1885,53 @@ |1744|Can You Eat Your Favorite Candy on Your Favorite Day?||30.4%|Medium|| |1745|Palindrome Partitioning IV||49.2%|Hard|| |1746|Maximum Subarray Sum After One Operation||62.2%|Medium|| -|1747|Leetflex Banned Accounts||69.9%|Medium|| -|1748|Sum of Unique Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1748.Sum-of-Unique-Elements)|75.2%|Easy|| -|1749|Maximum Absolute Sum of Any Subarray||51.7%|Medium|| +|1747|Leetflex Banned Accounts||69.8%|Medium|| +|1748|Sum of Unique Elements|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1748.Sum-of-Unique-Elements)|75.3%|Easy|| +|1749|Maximum Absolute Sum of Any Subarray||51.8%|Medium|| |1750|Minimum Length of String After Deleting Similar Ends||42.5%|Medium|| |1751|Maximum Number of Events That Can Be Attended II||47.6%|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)|62.9%|Easy|| +|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)|62.8%|Easy|| |1753|Maximum Score From Removing Stones||61.2%|Medium|| |1754|Largest Merge Of Two Strings||40.1%|Medium|| |1755|Closest Subsequence Sum||35.6%|Hard|| |1756|Design Most Recently Used Queue||77.8%|Medium|| |1757|Recyclable and Low Fat Products||96.0%|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.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.6%|Easy|| |1759|Count Number of Homogenous Substrings||42.0%|Medium|| |1760|Minimum Limit of Balls in a Bag||52.4%|Medium|| |1761|Minimum Degree of a Connected Trio in a Graph||37.3%|Hard|| -|1762|Buildings With an Ocean View||82.0%|Medium|| +|1762|Buildings With an Ocean View||81.8%|Medium|| |1763|Longest Nice Substring||61.6%|Easy|| |1764|Form Array by Concatenating Subarrays of Another Array||55.2%|Medium|| -|1765|Map of Highest Peak||54.7%|Medium|| -|1766|Tree of Coprimes||36.6%|Hard|| -|1767|Find the Subtasks That Did Not Execute||87.4%|Hard|| +|1765|Map of Highest Peak||54.8%|Medium|| +|1766|Tree of Coprimes||36.7%|Hard|| +|1767|Find the Subtasks That Did Not Execute||87.5%|Hard|| |1768|Merge Strings Alternately||77.2%|Easy|| |1769|Minimum Number of Operations to Move All Balls to Each Box||87.6%|Medium|| |1770|Maximum Score from Performing Multiplication Operations||29.0%|Medium|| |1771|Maximize Palindrome Length From Subsequences||34.1%|Hard|| |1772|Sort Features by Popularity||65.0%|Medium|| -|1773|Count Items Matching a Rule||86.2%|Easy|| -|1774|Closest Dessert Cost||59.6%|Medium|| -|1775|Equal Sum Arrays With Minimum Number of Operations||50.6%|Medium|| +|1773|Count Items Matching a Rule||86.1%|Easy|| +|1774|Closest Dessert Cost||59.5%|Medium|| +|1775|Equal Sum Arrays With Minimum Number of Operations||50.7%|Medium|| |1776|Car Fleet II||44.2%|Hard|| -|1777|Product's Price for Each Store||87.2%|Easy|| -|1778|Shortest Path in a Hidden Grid||46.3%|Medium|| +|1777|Product's Price for Each Store||87.1%|Easy|| +|1778|Shortest Path in a Hidden Grid||46.9%|Medium|| |1779|Find Nearest Point That Has the Same X or Y Coordinate||67.8%|Easy|| |1780|Check if Number is a Sum of Powers of Three||63.2%|Medium|| -|1781|Sum of Beauty of All Substrings||56.7%|Medium|| +|1781|Sum of Beauty of All Substrings||56.8%|Medium|| |1782|Count Pairs Of Nodes||31.1%|Hard|| -|1783|Grand Slam Titles||92.4%|Medium|| +|1783|Grand Slam Titles||92.2%|Medium|| |1784|Check if Binary String Has at Most One Segment of Ones||41.9%|Easy|| |1785|Minimum Elements to Add to Form a Given Sum||38.8%|Medium|| |1786|Number of Restricted Paths From First to Last Node||35.9%|Medium|| -|1787|Make the XOR of All Segments Equal to Zero||35.3%|Hard|| -|1788|Maximize the Beauty of the Garden||71.6%|Hard|| -|1789|Primary Department for Each Employee||79.4%|Easy|| -|1790|Check if One String Swap Can Make Strings Equal||45.5%|Easy|| -|1791|Find Center of Star Graph||86.6%|Medium|| -|1792|Maximum Average Pass Ratio||43.0%|Medium|| -|1793|Maximum Score of a Good Subarray||42.6%|Hard|| +|1787|Make the XOR of All Segments Equal to Zero||35.2%|Hard|| +|1788|Maximize the Beauty of the Garden||70.5%|Hard|| +|1789|Primary Department for Each Employee||80.1%|Easy|| +|1790|Check if One String Swap Can Make Strings Equal||45.6%|Easy|| +|1791|Find Center of Star Graph||86.5%|Medium|| +|1792|Maximum Average Pass Ratio||43.5%|Medium|| +|1793|Maximum Score of a Good Subarray||43.4%|Hard|| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------| ------------------------------------------------------------------ diff --git a/ctl/template/template.markdown b/ctl/template/template.markdown index 34939dea..089c448a 100644 --- a/ctl/template/template.markdown +++ b/ctl/template/template.markdown @@ -16,6 +16,7 @@ + Support Go version diff --git a/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL.go b/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL.go new file mode 100644 index 00000000..dc7fa65d --- /dev/null +++ b/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL.go @@ -0,0 +1,35 @@ +package leetcode + +import ( + "fmt" + "strconv" + "strings" +) + +type Codec struct { + urls []string +} + +func Constructor() Codec { + return Codec{[]string{}} +} + +// Encodes a URL to a shortened URL. +func (this *Codec) encode(longUrl string) string { + this.urls = append(this.urls, longUrl) + return "http://tinyurl.com/" + fmt.Sprintf("%v", len(this.urls)-1) +} + +// Decodes a shortened URL to its original URL. +func (this *Codec) decode(shortUrl string) string { + tmp := strings.Split(shortUrl, "/") + i, _ := strconv.Atoi(tmp[len(tmp)-1]) + return this.urls[i] +} + +/** + * Your Codec object will be instantiated and called as such: + * obj := Constructor(); + * url := obj.encode(longUrl); + * ans := obj.decode(url); + */ diff --git a/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL_test.go b/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL_test.go new file mode 100644 index 00000000..e3f10ae7 --- /dev/null +++ b/leetcode/0535.Encode-and-Decode-TinyURL/535. Encode and Decode TinyURL_test.go @@ -0,0 +1,15 @@ +package leetcode + +import ( + "fmt" + "testing" +) + +func Test_Problem535(t *testing.T) { + obj := Constructor() + fmt.Printf("obj = %v\n", obj) + e := obj.encode("https://leetcode.com/problems/design-tinyurl") + fmt.Printf("obj encode = %v\n", e) + d := obj.decode(e) + fmt.Printf("obj decode = %v\n", d) +} diff --git a/leetcode/0535.Encode-and-Decode-TinyURL/README.md b/leetcode/0535.Encode-and-Decode-TinyURL/README.md new file mode 100644 index 00000000..d7ae92b4 --- /dev/null +++ b/leetcode/0535.Encode-and-Decode-TinyURL/README.md @@ -0,0 +1,60 @@ +# [535. Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/) + + +## 题目 + +> Note: This is a companion problem to the System Design problem: Design TinyURL. + +TinyURL is a URL shortening service where you enter a URL such as `https://leetcode.com/problems/design-tinyurl` and it returns a short URL such as `http://tinyurl.com/4e9iAk`. + +Design the `encode` and `decode` methods for the TinyURL service. There is no restriction on how your encode/decode algorithm should work. You just need to ensure that a URL can be encoded to a tiny URL and the tiny URL can be decoded to the original URL. + +## 题目大意 + +TinyURL是一种URL简化服务, 比如:当你输入一个URL [https://leetcode.com/problems/design-tinyurl](https://leetcode.com/problems/design-tinyurl) 时,它将返回一个简化的URL [http://tinyurl.com/4e9iAk](http://tinyurl.com/4e9iAk). + +要求:设计一个 TinyURL 的加密 encode 和解密 decode 的方法。你的加密和解密算法如何设计和运作是没有限制的,你只需要保证一个URL可以被加密成一个TinyURL,并且这个TinyURL可以用解密方法恢复成原本的URL。 + +## 解题思路 + +- 简单题。由于题目并无规定 `encode()` 算法,所以自由度非常高。最简单的做法是把原始 `URL` 存起来,并记录下存在字符串数组中的下标位置。`decode()` 的时候根据存储的下标还原原始的 `URL`。 + +## 代码 + +```go +package leetcode + +import ( + "fmt" + "strconv" + "strings" +) + +type Codec struct { + urls []string +} + +func Constructor() Codec { + return Codec{[]string{}} +} + +// Encodes a URL to a shortened URL. +func (this *Codec) encode(longUrl string) string { + this.urls = append(this.urls, longUrl) + return "http://tinyurl.com/" + fmt.Sprintf("%v", len(this.urls)-1) +} + +// Decodes a shortened URL to its original URL. +func (this *Codec) decode(shortUrl string) string { + tmp := strings.Split(shortUrl, "/") + i, _ := strconv.Atoi(tmp[len(tmp)-1]) + return this.urls[i] +} + +/** + * Your Codec object will be instantiated and called as such: + * obj := Constructor(); + * url := obj.encode(longUrl); + * ans := obj.decode(url); + */ +``` \ No newline at end of file diff --git a/website/content/ChapterFour/0500~0599/0532.K-diff-Pairs-in-an-Array.md b/website/content/ChapterFour/0500~0599/0532.K-diff-Pairs-in-an-Array.md index c20e4c4b..22f1dd02 100644 --- a/website/content/ChapterFour/0500~0599/0532.K-diff-Pairs-in-an-Array.md +++ b/website/content/ChapterFour/0500~0599/0532.K-diff-Pairs-in-an-Array.md @@ -98,5 +98,5 @@ func findPairs(nums []int, k int) int { ----------------------------------------------

⬅️上一页

-

下一页➡️

+

下一页➡️

diff --git a/website/content/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md b/website/content/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md new file mode 100644 index 00000000..edb65894 --- /dev/null +++ b/website/content/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md @@ -0,0 +1,67 @@ +# [535. Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/) + + +## 题目 + +> Note: This is a companion problem to the System Design problem: Design TinyURL. + +TinyURL is a URL shortening service where you enter a URL such as `https://leetcode.com/problems/design-tinyurl` and it returns a short URL such as `http://tinyurl.com/4e9iAk`. + +Design the `encode` and `decode` methods for the TinyURL service. There is no restriction on how your encode/decode algorithm should work. You just need to ensure that a URL can be encoded to a tiny URL and the tiny URL can be decoded to the original URL. + +## 题目大意 + +TinyURL是一种URL简化服务, 比如:当你输入一个URL [https://leetcode.com/problems/design-tinyurl](https://leetcode.com/problems/design-tinyurl) 时,它将返回一个简化的URL [http://tinyurl.com/4e9iAk](http://tinyurl.com/4e9iAk). + +要求:设计一个 TinyURL 的加密 encode 和解密 decode 的方法。你的加密和解密算法如何设计和运作是没有限制的,你只需要保证一个URL可以被加密成一个TinyURL,并且这个TinyURL可以用解密方法恢复成原本的URL。 + +## 解题思路 + +- 简单题。由于题目并无规定 `encode()` 算法,所以自由度非常高。最简单的做法是把原始 `URL` 存起来,并记录下存在字符串数组中的下标位置。`decode()` 的时候根据存储的下标还原原始的 `URL`。 + +## 代码 + +```go +package leetcode + +import ( + "fmt" + "strconv" + "strings" +) + +type Codec struct { + urls []string +} + +func Constructor() Codec { + return Codec{[]string{}} +} + +// Encodes a URL to a shortened URL. +func (this *Codec) encode(longUrl string) string { + this.urls = append(this.urls, longUrl) + return "http://tinyurl.com/" + fmt.Sprintf("%v", len(this.urls)-1) +} + +// Decodes a shortened URL to its original URL. +func (this *Codec) decode(shortUrl string) string { + tmp := strings.Split(shortUrl, "/") + i, _ := strconv.Atoi(tmp[len(tmp)-1]) + return this.urls[i] +} + +/** + * Your Codec object will be instantiated and called as such: + * obj := Constructor(); + * url := obj.encode(longUrl); + * ans := obj.decode(url); + */ +``` + + +---------------------------------------------- +
+

⬅️上一页

+

下一页➡️

+
diff --git a/website/content/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md b/website/content/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md index d120b94d..46592cf5 100644 --- a/website/content/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md +++ b/website/content/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md @@ -75,6 +75,6 @@ func parse(s string) (int, int) { ----------------------------------------------
-

⬅️上一页

+

⬅️上一页

下一页➡️

diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index c50b8947..892c7381 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -113,7 +113,7 @@ weight: 1 |0985|Sum of Even Numbers After Queries|[Go]({{< relref "/ChapterFour/0900~0999/0985.Sum-of-Even-Numbers-After-Queries.md" >}})|Easy||||60.7%| |0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0900~0999/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||44.9%| |0999|Available Captures for Rook|[Go]({{< relref "/ChapterFour/0900~0999/0999.Available-Captures-for-Rook.md" >}})|Easy||||67.8%| -|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.6%| +|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.7%| |1011|Capacity To Ship Packages Within D Days|[Go]({{< relref "/ChapterFour/1000~1099/1011.Capacity-To-Ship-Packages-Within-D-Days.md" >}})|Medium||||59.7%| |1018|Binary Prefix Divisible By 5|[Go]({{< relref "/ChapterFour/1000~1099/1018.Binary-Prefix-Divisible-By-5.md" >}})|Easy||||47.8%| |1040|Moving Stones Until Consecutive II|[Go]({{< relref "/ChapterFour/1000~1099/1040.Moving-Stones-Until-Consecutive-II.md" >}})|Medium||||54.1%| @@ -137,7 +137,7 @@ weight: 1 |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.1%| +|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.2%| |1295|Find Numbers with Even Number of Digits|[Go]({{< relref "/ChapterFour/1200~1299/1295.Find-Numbers-with-Even-Number-of-Digits.md" >}})|Easy||||78.9%| |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%| @@ -145,21 +145,21 @@ weight: 1 |1313|Decompress Run-Length Encoded List|[Go]({{< relref "/ChapterFour/1300~1399/1313.Decompress-Run-Length-Encoded-List.md" >}})|Easy||||85.4%| |1329|Sort the Matrix Diagonally|[Go]({{< relref "/ChapterFour/1300~1399/1329.Sort-the-Matrix-Diagonally.md" >}})|Medium||||81.8%| |1337|The K Weakest Rows in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1337.The-K-Weakest-Rows-in-a-Matrix.md" >}})|Easy||||72.0%| -|1380|Lucky Numbers in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1380.Lucky-Numbers-in-a-Matrix.md" >}})|Easy||||70.6%| +|1380|Lucky Numbers in a Matrix|[Go]({{< relref "/ChapterFour/1300~1399/1380.Lucky-Numbers-in-a-Matrix.md" >}})|Easy||||70.5%| |1385|Find the Distance Value Between Two Arrays|[Go]({{< relref "/ChapterFour/1300~1399/1385.Find-the-Distance-Value-Between-Two-Arrays.md" >}})|Easy||||66.4%| |1389|Create Target Array in the Given Order|[Go]({{< relref "/ChapterFour/1300~1399/1389.Create-Target-Array-in-the-Given-Order.md" >}})|Easy||||84.8%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||46.7%| |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||||62.3%| |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%| -|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.2%| +|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.2%| |1480|Running Sum of 1d Array|[Go]({{< relref "/ChapterFour/1400~1499/1480.Running-Sum-of-1d-Array.md" >}})|Easy||||88.9%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.7%| |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1500~1599/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.0%| -|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%| +|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.3%| |1619|Mean of Array After Removing Some Elements|[Go]({{< relref "/ChapterFour/1600~1699/1619.Mean-of-Array-After-Removing-Some-Elements.md" >}})|Easy||||64.9%| |1629|Slowest Key|[Go]({{< relref "/ChapterFour/1600~1699/1629.Slowest-Key.md" >}})|Easy||||59.1%| -|1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||66.8%| +|1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||66.9%| |1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1600~1699/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||59.9%| |1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||53.3%| |1652|Defuse the Bomb|[Go]({{< relref "/ChapterFour/1600~1699/1652.Defuse-the-Bomb.md" >}})|Easy||||62.4%| @@ -168,9 +168,9 @@ weight: 1 |1700|Number of Students Unable to Eat Lunch|[Go]({{< relref "/ChapterFour/1700~1799/1700.Number-of-Students-Unable-to-Eat-Lunch.md" >}})|Easy||||68.1%| |1732|Find the Highest Altitude|[Go]({{< relref "/ChapterFour/1700~1799/1732.Find-the-Highest-Altitude.md" >}})|Easy||||80.5%| |1742|Maximum Number of Balls in a Box|[Go]({{< relref "/ChapterFour/1700~1799/1742.Maximum-Number-of-Balls-in-a-Box.md" >}})|Easy||||74.5%| -|1748|Sum of Unique Elements|[Go]({{< relref "/ChapterFour/1700~1799/1748.Sum-of-Unique-Elements.md" >}})|Easy||||75.2%| -|1752|Check if Array Is Sorted and Rotated|[Go]({{< relref "/ChapterFour/1700~1799/1752.Check-if-Array-Is-Sorted-and-Rotated.md" >}})|Easy||||62.9%| -|1758|Minimum Changes To Make Alternating Binary String|[Go]({{< relref "/ChapterFour/1700~1799/1758.Minimum-Changes-To-Make-Alternating-Binary-String.md" >}})|Easy||||58.7%| +|1748|Sum of Unique Elements|[Go]({{< relref "/ChapterFour/1700~1799/1748.Sum-of-Unique-Elements.md" >}})|Easy||||75.3%| +|1752|Check if Array Is Sorted and Rotated|[Go]({{< relref "/ChapterFour/1700~1799/1752.Check-if-Array-Is-Sorted-and-Rotated.md" >}})|Easy||||62.8%| +|1758|Minimum Changes To Make Alternating Binary String|[Go]({{< relref "/ChapterFour/1700~1799/1758.Minimum-Changes-To-Make-Alternating-Binary-String.md" >}})|Easy||||58.6%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index 19134d43..61ad4e39 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -119,7 +119,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0126|Word Ladder II|[Go]({{< relref "/ChapterFour/0100~0199/0126.Word-Ladder-II.md" >}})|Hard| O(n)| O(n^2)|❤️|23.8%| |0131|Palindrome Partitioning|[Go]({{< relref "/ChapterFour/0100~0199/0131.Palindrome-Partitioning.md" >}})|Medium| O(n)| O(n^2)|❤️|52.3%| |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.3%| -|0212|Word Search II|[Go]({{< relref "/ChapterFour/0200~0299/0212.Word-Search-II.md" >}})|Hard| O(n^2)| O(n^2)|❤️|37.2%| +|0212|Word Search II|[Go]({{< relref "/ChapterFour/0200~0299/0212.Word-Search-II.md" >}})|Hard| O(n^2)| O(n^2)|❤️|37.3%| |0216|Combination Sum III|[Go]({{< relref "/ChapterFour/0200~0299/0216.Combination-Sum-III.md" >}})|Medium| O(n)| O(1)|❤️|60.4%| |0306|Additive Number|[Go]({{< relref "/ChapterFour/0300~0399/0306.Additive-Number.md" >}})|Medium| O(n^2)| O(1)|❤️|29.7%| |0357|Count Numbers with Unique Digits|[Go]({{< relref "/ChapterFour/0300~0399/0357.Count-Numbers-with-Unique-Digits.md" >}})|Medium| O(1)| O(1)||48.9%| @@ -130,7 +130,7 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |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%| |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|75.9%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.2%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.1%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.0%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||35.6%| |1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}})|Hard||||35.7%| diff --git a/website/content/ChapterTwo/Binary_Search.md b/website/content/ChapterTwo/Binary_Search.md index 393fbb81..87b76833 100644 --- a/website/content/ChapterTwo/Binary_Search.md +++ b/website/content/ChapterTwo/Binary_Search.md @@ -196,7 +196,7 @@ func peakIndexInMountainArray(A []int) int { |1283|Find the Smallest Divisor Given a Threshold|[Go]({{< relref "/ChapterFour/1200~1299/1283.Find-the-Smallest-Divisor-Given-a-Threshold.md" >}})|Medium||||49.7%| |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.0%| -|1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.1%| +|1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||36.4%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||33.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Bit_Manipulation.md b/website/content/ChapterTwo/Bit_Manipulation.md index 997a234e..ead10245 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -66,7 +66,7 @@ X & ~X = 0 |0405|Convert a Number to Hexadecimal|[Go]({{< relref "/ChapterFour/0400~0499/0405.Convert-a-Number-to-Hexadecimal.md" >}})|Easy| O(n)| O(1)||44.5%| |0421|Maximum XOR of Two Numbers in an Array|[Go]({{< relref "/ChapterFour/0400~0499/0421.Maximum-XOR-of-Two-Numbers-in-an-Array.md" >}})|Medium| O(n)| O(1)|❤️|54.2%| |0461|Hamming Distance|[Go]({{< relref "/ChapterFour/0400~0499/0461.Hamming-Distance.md" >}})|Easy| O(n)| O(1)||73.2%| -|0476|Number Complement|[Go]({{< relref "/ChapterFour/0400~0499/0476.Number-Complement.md" >}})|Easy| O(n)| O(1)||65.2%| +|0476|Number Complement|[Go]({{< relref "/ChapterFour/0400~0499/0476.Number-Complement.md" >}})|Easy| O(n)| O(1)||65.1%| |0477|Total Hamming Distance|[Go]({{< relref "/ChapterFour/0400~0499/0477.Total-Hamming-Distance.md" >}})|Medium| O(n)| O(1)||50.6%| |0693|Binary Number with Alternating Bits|[Go]({{< relref "/ChapterFour/0600~0699/0693.Binary-Number-with-Alternating-Bits.md" >}})|Easy| O(n)| O(1)|❤️|59.9%| |0756|Pyramid Transition Matrix|[Go]({{< relref "/ChapterFour/0700~0799/0756.Pyramid-Transition-Matrix.md" >}})|Medium| O(n log n)| O(n)||55.6%| @@ -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.3%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.4%| |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.8%| -|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.5%| +|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.4%| |1720|Decode XORed Array|[Go]({{< relref "/ChapterFour/1700~1799/1720.Decode-XORed-Array.md" >}})|Easy||||85.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Breadth_First_Search.md b/website/content/ChapterTwo/Breadth_First_Search.md index fee32837..4e121d43 100644 --- a/website/content/ChapterTwo/Breadth_First_Search.md +++ b/website/content/ChapterTwo/Breadth_First_Search.md @@ -34,7 +34,7 @@ weight: 10 |1091|Shortest Path in Binary Matrix|[Go]({{< relref "/ChapterFour/1000~1099/1091.Shortest-Path-in-Binary-Matrix.md" >}})|Medium||||40.0%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.3%| |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.6%| +|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.5%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index 63b0e879..66aebc19 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -19,7 +19,7 @@ weight: 9 |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||||49.8%| |0108|Convert Sorted Array to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0108.Convert-Sorted-Array-to-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||60.6%| |0109|Convert Sorted List to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0109.Convert-Sorted-List-to-Binary-Search-Tree.md" >}})|Medium| O(log n)| O(n)||50.4%| -|0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.7%| +|0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.8%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.6%| |0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.5%| |0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.3%| @@ -45,7 +45,7 @@ weight: 9 |0529|Minesweeper|[Go]({{< relref "/ChapterFour/0500~0599/0529.Minesweeper.md" >}})|Medium||||61.3%| |0538|Convert BST to Greater Tree|[Go]({{< relref "/ChapterFour/0500~0599/0538.Convert-BST-to-Greater-Tree.md" >}})|Medium||||59.6%| |0542|01 Matrix|[Go]({{< relref "/ChapterFour/0500~0599/0542.01-Matrix.md" >}})|Medium| O(n)| O(1)||41.0%| -|0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})|Medium||||60.5%| +|0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})|Medium||||60.6%| |0563|Binary Tree Tilt|[Go]({{< relref "/ChapterFour/0500~0599/0563.Binary-Tree-Tilt.md" >}})|Easy||||53.1%| |0638|Shopping Offers|[Go]({{< relref "/ChapterFour/0600~0699/0638.Shopping-Offers.md" >}})|Medium||||53.0%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard||||33.0%| @@ -84,7 +84,7 @@ weight: 9 |1302|Deepest Leaves Sum|[Go]({{< relref "/ChapterFour/1300~1399/1302.Deepest-Leaves-Sum.md" >}})|Medium||||84.2%| |1306|Jump Game III|[Go]({{< relref "/ChapterFour/1300~1399/1306.Jump-Game-III.md" >}})|Medium||||62.3%| |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.1%| +|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 4708c7ea..7de50cbf 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -59,12 +59,12 @@ weight: 7 |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.4%| |1423|Maximum Points You Can Obtain from Cards|[Go]({{< relref "/ChapterFour/1400~1499/1423.Maximum-Points-You-Can-Obtain-from-Cards.md" >}})|Medium||||46.7%| |1463|Cherry Pickup II|[Go]({{< relref "/ChapterFour/1400~1499/1463.Cherry-Pickup-II.md" >}})|Hard||||69.0%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.2%| -|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.6%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.1%| +|1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.5%| |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.0%| -|1690|Stone Game VII|[Go]({{< relref "/ChapterFour/1600~1699/1690.Stone-Game-VII.md" >}})|Medium||||48.4%| +|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||||48.5%| |1691|Maximum Height by Stacking Cuboids|[Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}})|Hard||||50.1%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Hash_Table.md b/website/content/ChapterTwo/Hash_Table.md index d80b0118..67493d7d 100644 --- a/website/content/ChapterTwo/Hash_Table.md +++ b/website/content/ChapterTwo/Hash_Table.md @@ -42,6 +42,7 @@ weight: 13 |0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0400~0499/0463.Island-Perimeter.md" >}})|Easy||||66.7%| |0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500~0599/0500.Keyboard-Row.md" >}})|Easy||||65.7%| |0508|Most Frequent Subtree Sum|[Go]({{< relref "/ChapterFour/0500~0599/0508.Most-Frequent-Subtree-Sum.md" >}})|Medium||||59.1%| +|0535|Encode and Decode TinyURL|[Go]({{< relref "/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md" >}})|Medium||||81.5%| |0575|Distribute Candies|[Go]({{< relref "/ChapterFour/0500~0599/0575.Distribute-Candies.md" >}})|Easy||||64.6%| |0594|Longest Harmonious Subsequence|[Go]({{< relref "/ChapterFour/0500~0599/0594.Longest-Harmonious-Subsequence.md" >}})|Easy||||51.2%| |0599|Minimum Index Sum of Two Lists|[Go]({{< relref "/ChapterFour/0500~0599/0599.Minimum-Index-Sum-of-Two-Lists.md" >}})|Easy||||51.8%| @@ -69,7 +70,7 @@ weight: 13 |0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0900~0999/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||54.1%| |0987|Vertical Order Traversal of a Binary Tree|[Go]({{< relref "/ChapterFour/0900~0999/0987.Vertical-Order-Traversal-of-a-Binary-Tree.md" >}})|Hard||||38.9%| |0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0900~0999/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n) |❤️|50.7%| -|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.6%| +|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1000~1099/1002.Find-Common-Characters.md" >}})|Easy||||68.7%| |1078|Occurrences After Bigram|[Go]({{< relref "/ChapterFour/1000~1099/1078.Occurrences-After-Bigram.md" >}})|Easy||||64.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%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||39.4%| @@ -79,7 +80,7 @@ weight: 13 |1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1500~1599/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.0%| |1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1600~1699/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||59.9%| |1679|Max Number of K-Sum Pairs|[Go]({{< relref "/ChapterFour/1600~1699/1679.Max-Number-of-K-Sum-Pairs.md" >}})|Medium||||54.0%| -|1748|Sum of Unique Elements|[Go]({{< relref "/ChapterFour/1700~1799/1748.Sum-of-Unique-Elements.md" >}})|Easy||||75.2%| +|1748|Sum of Unique Elements|[Go]({{< relref "/ChapterFour/1700~1799/1748.Sum-of-Unique-Elements.md" >}})|Easy||||75.3%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Linked_List.md b/website/content/ChapterTwo/Linked_List.md index 8b0833ff..e615e631 100644 --- a/website/content/ChapterTwo/Linked_List.md +++ b/website/content/ChapterTwo/Linked_List.md @@ -27,7 +27,7 @@ weight: 4 |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)||35.8%| |0021|Merge Two Sorted Lists|[Go]({{< relref "/ChapterFour/0001~0099/0021.Merge-Two-Sorted-Lists.md" >}})|Easy| O(log n)| O(1)||56.2%| |0023|Merge k Sorted Lists|[Go]({{< relref "/ChapterFour/0001~0099/0023.Merge-k-Sorted-Lists.md" >}})|Hard| O(log n)| O(1)|❤️|42.8%| -|0024|Swap Nodes in Pairs|[Go]({{< relref "/ChapterFour/0001~0099/0024.Swap-Nodes-in-Pairs.md" >}})|Medium| O(n)| O(1)||53.2%| +|0024|Swap Nodes in Pairs|[Go]({{< relref "/ChapterFour/0001~0099/0024.Swap-Nodes-in-Pairs.md" >}})|Medium| O(n)| O(1)||53.3%| |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.1%| |0061|Rotate List|[Go]({{< relref "/ChapterFour/0001~0099/0061.Rotate-List.md" >}})|Medium| O(n)| O(1)||31.8%| |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.3%| @@ -53,11 +53,11 @@ weight: 4 |0817|Linked List Components|[Go]({{< relref "/ChapterFour/0800~0899/0817.Linked-List-Components.md" >}})|Medium| O(n)| O(1)||57.8%| |0876|Middle of the Linked List|[Go]({{< relref "/ChapterFour/0800~0899/0876.Middle-of-the-Linked-List.md" >}})|Easy| O(n)| O(1)|❤️|69.2%| |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1000~1099/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.3%| -|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go]({{< relref "/ChapterFour/1100~1199/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List.md" >}})|Medium||||41.5%| +|1171|Remove Zero Sum Consecutive Nodes from Linked List|[Go]({{< relref "/ChapterFour/1100~1199/1171.Remove-Zero-Sum-Consecutive-Nodes-from-Linked-List.md" >}})|Medium||||41.6%| |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.8%| |1669|Merge In Between Linked Lists|[Go]({{< relref "/ChapterFour/1600~1699/1669.Merge-In-Between-Linked-Lists.md" >}})|Medium||||76.1%| |1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1600~1699/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||54.2%| -|1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||68.2%| +|1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||68.4%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index 4a706904..f7b7a5e4 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -44,6 +44,7 @@ weight: 12 |0453|Minimum Moves to Equal Array Elements|[Go]({{< relref "/ChapterFour/0400~0499/0453.Minimum-Moves-to-Equal-Array-Elements.md" >}})|Easy||||50.8%| |0483|Smallest Good Base|[Go]({{< relref "/ChapterFour/0400~0499/0483.Smallest-Good-Base.md" >}})|Hard||||36.3%| |0507|Perfect Number|[Go]({{< relref "/ChapterFour/0500~0599/0507.Perfect-Number.md" >}})|Easy||||36.2%| +|0535|Encode and Decode TinyURL|[Go]({{< relref "/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md" >}})|Medium||||81.5%| |0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||68.3%| |0598|Range Addition II|[Go]({{< relref "/ChapterFour/0500~0599/0598.Range-Addition-II.md" >}})|Easy||||50.2%| |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%| @@ -81,7 +82,7 @@ weight: 12 |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.8%| |1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1500~1599/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.7%| -|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.2%| +|1641|Count Sorted Vowel Strings|[Go]({{< relref "/ChapterFour/1600~1699/1641.Count-Sorted-Vowel-Strings.md" >}})|Medium||||76.1%| |1648|Sell Diminishing-Valued Colored Balls|[Go]({{< relref "/ChapterFour/1600~1699/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}})|Medium||||30.5%| |1680|Concatenation of Consecutive Binary Numbers|[Go]({{< relref "/ChapterFour/1600~1699/1680.Concatenation-of-Consecutive-Binary-Numbers.md" >}})|Medium||||52.3%| |1685|Sum of Absolute Differences in a Sorted Array|[Go]({{< relref "/ChapterFour/1600~1699/1685.Sum-of-Absolute-Differences-in-a-Sorted-Array.md" >}})|Medium||||62.8%| diff --git a/website/content/ChapterTwo/Sliding_Window.md b/website/content/ChapterTwo/Sliding_Window.md index 34fd4693..11b2ceb5 100644 --- a/website/content/ChapterTwo/Sliding_Window.md +++ b/website/content/ChapterTwo/Sliding_Window.md @@ -38,7 +38,7 @@ weight: 17 |0567|Permutation in String|[Go]({{< relref "/ChapterFour/0500~0599/0567.Permutation-in-String.md" >}})|Medium| O(n)| O(1)|❤️|44.6%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium| O(n)| O(1)|❤️|46.6%| |0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0900~0999/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n)|❤️|50.7%| -|0995|Minimum Number of K Consecutive Bit Flips|[Go]({{< relref "/ChapterFour/0900~0999/0995.Minimum-Number-of-K-Consecutive-Bit-Flips.md" >}})|Hard| O(n)| O(1)|❤️|49.9%| +|0995|Minimum Number of K Consecutive Bit Flips|[Go]({{< relref "/ChapterFour/0900~0999/0995.Minimum-Number-of-K-Consecutive-Bit-Flips.md" >}})|Hard| O(n)| O(1)|❤️|50.0%| |1004|Max Consecutive Ones III|[Go]({{< relref "/ChapterFour/1000~1099/1004.Max-Consecutive-Ones-III.md" >}})|Medium| O(n)| O(1) ||60.9%| |1040|Moving Stones Until Consecutive II|[Go]({{< relref "/ChapterFour/1000~1099/1040.Moving-Stones-Until-Consecutive-II.md" >}})|Medium| O(n log n)| O(1) |❤️|54.1%| |1052|Grumpy Bookstore Owner|[Go]({{< relref "/ChapterFour/1000~1099/1052.Grumpy-Bookstore-Owner.md" >}})|Medium| O(n log n)| O(1) ||55.8%| diff --git a/website/content/ChapterTwo/Sort.md b/website/content/ChapterTwo/Sort.md index aece1d3f..408eda76 100644 --- a/website/content/ChapterTwo/Sort.md +++ b/website/content/ChapterTwo/Sort.md @@ -48,7 +48,7 @@ weight: 14 |1235|Maximum Profit in Job Scheduling|[Go]({{< relref "/ChapterFour/1200~1299/1235.Maximum-Profit-in-Job-Scheduling.md" >}})|Hard||||47.4%| |1305|All Elements in Two Binary Search Trees|[Go]({{< relref "/ChapterFour/1300~1399/1305.All-Elements-in-Two-Binary-Search-Trees.md" >}})|Medium||||77.8%| |1329|Sort the Matrix Diagonally|[Go]({{< relref "/ChapterFour/1300~1399/1329.Sort-the-Matrix-Diagonally.md" >}})|Medium||||81.8%| -|1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||66.8%| +|1636|Sort Array by Increasing Frequency|[Go]({{< relref "/ChapterFour/1600~1699/1636.Sort-Array-by-Increasing-Frequency.md" >}})|Easy||||66.9%| |1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1600~1699/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||59.9%| |1647|Minimum Deletions to Make Character Frequencies Unique|[Go]({{< relref "/ChapterFour/1600~1699/1647.Minimum-Deletions-to-Make-Character-Frequencies-Unique.md" >}})|Medium||||54.7%| |1648|Sell Diminishing-Valued Colored Balls|[Go]({{< relref "/ChapterFour/1600~1699/1648.Sell-Diminishing-Valued-Colored-Balls.md" >}})|Medium||||30.5%| diff --git a/website/content/ChapterTwo/Stack.md b/website/content/ChapterTwo/Stack.md index 298d38d5..8b402a74 100644 --- a/website/content/ChapterTwo/Stack.md +++ b/website/content/ChapterTwo/Stack.md @@ -42,7 +42,7 @@ weight: 5 |0636|Exclusive Time of Functions|[Go]({{< relref "/ChapterFour/0600~0699/0636.Exclusive-Time-of-Functions.md" >}})|Medium| O(n)| O(n)||54.7%| |0682|Baseball Game|[Go]({{< relref "/ChapterFour/0600~0699/0682.Baseball-Game.md" >}})|Easy| O(n)| O(n)||67.2%| |0726|Number of Atoms|[Go]({{< relref "/ChapterFour/0700~0799/0726.Number-of-Atoms.md" >}})|Hard| O(n)| O(n) |❤️|51.0%| -|0735|Asteroid Collision|[Go]({{< relref "/ChapterFour/0700~0799/0735.Asteroid-Collision.md" >}})|Medium| O(n)| O(n) ||43.2%| +|0735|Asteroid Collision|[Go]({{< relref "/ChapterFour/0700~0799/0735.Asteroid-Collision.md" >}})|Medium| O(n)| O(n) ||43.3%| |0739|Daily Temperatures|[Go]({{< relref "/ChapterFour/0700~0799/0739.Daily-Temperatures.md" >}})|Medium| O(n)| O(n) ||64.7%| |0844|Backspace String Compare|[Go]({{< relref "/ChapterFour/0800~0899/0844.Backspace-String-Compare.md" >}})|Easy| O(n)| O(n) ||47.1%| |0856|Score of Parentheses|[Go]({{< relref "/ChapterFour/0800~0899/0856.Score-of-Parentheses.md" >}})|Medium| O(n)| O(n)||64.8%| @@ -55,7 +55,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.5%| |1019|Next Greater Node In Linked List|[Go]({{< relref "/ChapterFour/1000~1099/1019.Next-Greater-Node-In-Linked-List.md" >}})|Medium| O(n)| O(1)||58.3%| |1021|Remove Outermost Parentheses|[Go]({{< relref "/ChapterFour/1000~1099/1021.Remove-Outermost-Parentheses.md" >}})|Easy| O(n)| O(1)||79.1%| -|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)||70.9%| +|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.0%| |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.2%| |1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1600~1699/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||45.4%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index b9a7020a..c69876ed 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -53,7 +53,7 @@ weight: 2 |1249|Minimum Remove to Make Valid Parentheses|[Go]({{< relref "/ChapterFour/1200~1299/1249.Minimum-Remove-to-Make-Valid-Parentheses.md" >}})|Medium||||64.2%| |1332|Remove Palindromic Subsequences|[Go]({{< relref "/ChapterFour/1300~1399/1332.Remove-Palindromic-Subsequences.md" >}})|Easy||||68.1%| |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.0%| -|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.5%| +|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.4%| |1573|Number of Ways to Split a String|[Go]({{< relref "/ChapterFour/1500~1599/1573.Number-of-Ways-to-Split-a-String.md" >}})|Medium||||31.3%| |1614|Maximum Nesting Depth of the Parentheses|[Go]({{< relref "/ChapterFour/1600~1699/1614.Maximum-Nesting-Depth-of-the-Parentheses.md" >}})|Easy||||82.8%| |1624|Largest Substring Between Two Equal Characters|[Go]({{< relref "/ChapterFour/1600~1699/1624.Largest-Substring-Between-Two-Equal-Characters.md" >}})|Easy||||58.7%| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index 35a821ed..8bdd0b5c 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -23,7 +23,7 @@ weight: 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||||49.8%| |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.3%| |0108|Convert Sorted Array to Binary Search Tree|[Go]({{< relref "/ChapterFour/0100~0199/0108.Convert-Sorted-Array-to-Binary-Search-Tree.md" >}})|Easy| O(n)| O(1)||60.6%| -|0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.7%| +|0110|Balanced Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0110.Balanced-Binary-Tree.md" >}})|Easy| O(n)| O(1)||44.8%| |0111|Minimum Depth of Binary Tree|[Go]({{< relref "/ChapterFour/0100~0199/0111.Minimum-Depth-of-Binary-Tree.md" >}})|Easy| O(n)| O(1)||39.6%| |0112|Path Sum|[Go]({{< relref "/ChapterFour/0100~0199/0112.Path-Sum.md" >}})|Easy| O(n)| O(1)||42.5%| |0113|Path Sum II|[Go]({{< relref "/ChapterFour/0100~0199/0113.Path-Sum-II.md" >}})|Medium| O(n)| O(1)||49.3%| diff --git a/website/content/ChapterTwo/Union_Find.md b/website/content/ChapterTwo/Union_Find.md index 3a0d2fbf..45f41f4e 100644 --- a/website/content/ChapterTwo/Union_Find.md +++ b/website/content/ChapterTwo/Union_Find.md @@ -23,7 +23,7 @@ weight: 16 |0130|Surrounded Regions|[Go]({{< relref "/ChapterFour/0100~0199/0130.Surrounded-Regions.md" >}})|Medium| O(m\*n)| O(m\*n)||29.5%| |0200|Number of Islands|[Go]({{< relref "/ChapterFour/0200~0299/0200.Number-of-Islands.md" >}})|Medium| O(m\*n)| O(m\*n)||49.3%| |0399|Evaluate Division|[Go]({{< relref "/ChapterFour/0300~0399/0399.Evaluate-Division.md" >}})|Medium| O(n)| O(n)||54.4%| -|0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})|Medium| O(n^2)| O(n)||60.5%| +|0547|Number of Provinces|[Go]({{< relref "/ChapterFour/0500~0599/0547.Number-of-Provinces.md" >}})|Medium| O(n^2)| O(n)||60.6%| |0684|Redundant Connection|[Go]({{< relref "/ChapterFour/0600~0699/0684.Redundant-Connection.md" >}})|Medium| O(n)| O(n)||59.0%| |0685|Redundant Connection II|[Go]({{< relref "/ChapterFour/0600~0699/0685.Redundant-Connection-II.md" >}})|Hard| O(n)| O(n)||33.0%| |0721|Accounts Merge|[Go]({{< relref "/ChapterFour/0700~0799/0721.Accounts-Merge.md" >}})|Medium| O(n)| O(n)|❤️|52.0%| @@ -40,7 +40,7 @@ weight: 16 |1202|Smallest String With Swaps|[Go]({{< relref "/ChapterFour/1200~1299/1202.Smallest-String-With-Swaps.md" >}})|Medium||||48.8%| |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.2%| -|1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.1%| +|1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||50.0%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|