From f0792d1179b1a6ab12fb9f906a3fc40ef68f9a80 Mon Sep 17 00:00:00 2001 From: halfrost Date: Fri, 12 Nov 2021 21:21:21 +0800 Subject: [PATCH] Update solution 0520 --- README.md | 24 +++--- leetcode/0520.Detect-Capital/README.md | 9 ++- .../0500~0599/0518.Coin-Change-2.md | 2 +- .../0500~0599/0520.Detect-Capital.md | 75 +++++++++++++++++++ .../0500~0599/0523.Continuous-Subarray-Sum.md | 2 +- website/content/ChapterTwo/Backtracking.md | 4 +- .../content/ChapterTwo/Bit_Manipulation.md | 4 +- .../content/ChapterTwo/Depth_First_Search.md | 2 +- .../content/ChapterTwo/Dynamic_Programming.md | 4 +- website/content/ChapterTwo/Math.md | 2 +- website/content/ChapterTwo/String.md | 1 + website/content/ChapterTwo/Tree.md | 2 +- 12 files changed, 105 insertions(+), 26 deletions(-) create mode 100644 website/content/ChapterFour/0500~0599/0520.Detect-Capital.md diff --git a/README.md b/README.md index 17ab79b15..340dbd3cd 100755 --- a/README.md +++ b/README.md @@ -127,15 +127,15 @@ | | Easy | Medium | Hard | Total | |:--------:|:--------:|:--------:|:--------:|:--------:| |Optimizing|33|45|30|108| -|Accepted|**280**|**426**|**126**|**832**| +|Accepted|**281**|**426**|**126**|**833**| |Total|527|1107|442|2076| -|Perfection Rate|88.2%|89.4%|76.2%|87.0%| -|Completion Rate|53.1%|38.5%|28.5%|40.1%| +|Perfection Rate|88.3%|89.4%|76.2%|87.0%| +|Completion Rate|53.3%|38.5%|28.5%|40.1%| |------------|----------------------------|----------------------------|----------------------------|----------------------------| ## 二. 目录 -以下已经收录了 727 道题的题解,还有 11 道题在尝试优化到 beats 100% +以下已经收录了 728 道题的题解,还有 11 道题在尝试优化到 beats 100% | No. | Title | Solution | Acceptance | Difficulty | Frequency | |:--------:|:--------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:| @@ -479,7 +479,7 @@ |0338|Counting Bits|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0338.Counting-Bits)|72.0%|Easy|| |0339|Nested List Weight Sum||78.7%|Medium|| |0340|Longest Substring with At Most K Distinct Characters||46.7%|Medium|| -|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|57.5%|Medium|| +|0341|Flatten Nested List Iterator|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0341.Flatten-Nested-List-Iterator)|57.6%|Medium|| |0342|Power of Four|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0342.Power-of-Four)|42.9%|Easy|| |0343|Integer Break|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0343.Integer-Break)|52.7%|Medium|| |0344|Reverse String|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0344.Reverse-String)|72.6%|Easy|| @@ -658,7 +658,7 @@ |0517|Super Washing Machines||39.0%|Hard|| |0518|Coin Change 2|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0518.Coin-Change-2)|55.2%|Medium|| |0519|Random Flip Matrix||38.6%|Medium|| -|0520|Detect Capital||54.2%|Easy|| +|0520|Detect Capital|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0520.Detect-Capital)|54.2%|Easy|| |0521|Longest Uncommon Subsequence I||59.8%|Easy|| |0522|Longest Uncommon Subsequence II||39.9%|Medium|| |0523|Continuous Subarray Sum|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0523.Continuous-Subarray-Sum)|26.2%|Medium|| @@ -992,7 +992,7 @@ |0851|Loud and Rich|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0851.Loud-and-Rich)|55.0%|Medium|| |0852|Peak Index in a Mountain Array|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0852.Peak-Index-in-a-Mountain-Array)|71.4%|Easy|| |0853|Car Fleet|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0853.Car-Fleet)|47.0%|Medium|| -|0854|K-Similar Strings||38.8%|Hard|| +|0854|K-Similar Strings||38.9%|Hard|| |0855|Exam Room||43.5%|Medium|| |0856|Score of Parentheses|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0856.Score-of-Parentheses)|65.5%|Medium|| |0857|Minimum Cost to Hire K Workers||51.3%|Hard|| @@ -1107,7 +1107,7 @@ |0966|Vowel Spellchecker|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0966.Vowel-Spellchecker)|51.7%|Medium|| |0967|Numbers With Same Consecutive Differences||46.5%|Medium|| |0968|Binary Tree Cameras|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0968.Binary-Tree-Cameras)|41.2%|Hard|| -|0969|Pancake Sorting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0969.Pancake-Sorting)|69.3%|Medium|| +|0969|Pancake Sorting|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0969.Pancake-Sorting)|69.4%|Medium|| |0970|Powerful Integers|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0970.Powerful-Integers)|43.4%|Medium|| |0971|Flip Binary Tree To Match Preorder Traversal|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/0971.Flip-Binary-Tree-To-Match-Preorder-Traversal)|49.8%|Medium|| |0972|Equal Rational Numbers||42.3%|Hard|| @@ -1283,7 +1283,7 @@ |1142|User Activity for the Past 30 Days II||35.8%|Easy|| |1143|Longest Common Subsequence|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1143.Longest-Common-Subsequence)|58.8%|Medium|| |1144|Decrease Elements To Make Array Zigzag||46.7%|Medium|| -|1145|Binary Tree Coloring Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1145.Binary-Tree-Coloring-Game)|51.1%|Medium|| +|1145|Binary Tree Coloring Game|[Go](https://github.com/halfrost/LeetCode-Go/tree/master/leetcode/1145.Binary-Tree-Coloring-Game)|51.0%|Medium|| |1146|Snapshot Array||37.1%|Medium|| |1147|Longest Chunked Palindrome Decomposition||60.2%|Hard|| |1148|Article Views I||77.1%|Easy|| @@ -2127,7 +2127,7 @@ |1986|Minimum Number of Work Sessions to Finish the Tasks||30.8%|Medium|| |1987|Number of Unique Good Subsequences||50.7%|Hard|| |1988|Find Cutoff Score for Each School||71.5%|Medium|| -|1989|Maximum Number of People That Can Be Caught in Tag||57.6%|Medium|| +|1989|Maximum Number of People That Can Be Caught in Tag||57.7%|Medium|| |1990|Count the Number of Experiments||52.4%|Medium|| |1991|Find the Middle Index in Array||64.7%|Easy|| |1992|Find All Groups of Farmland||65.4%|Medium|| @@ -2211,10 +2211,10 @@ |2070|Most Beautiful Item for Each Query||42.7%|Medium|| |2071|Maximum Number of Tasks You Can Assign||29.4%|Hard|| |2072|The Winner University||92.2%|Easy|| -|2073|Time Needed to Buy Tickets||56.2%|Easy|| +|2073|Time Needed to Buy Tickets||56.3%|Easy|| |2074|Reverse Nodes in Even Length Groups||38.9%|Medium|| |2075|Decode the Slanted Ciphertext||46.9%|Medium|| -|2076|Process Restricted Friend Requests||39.0%|Hard|| +|2076|Process Restricted Friend Requests||39.1%|Hard|| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------| ------------------------------------------------------------------ diff --git a/leetcode/0520.Detect-Capital/README.md b/leetcode/0520.Detect-Capital/README.md index 376ef59a5..c4532bfd8 100644 --- a/leetcode/0520.Detect-Capital/README.md +++ b/leetcode/0520.Detect-Capital/README.md @@ -1,4 +1,4 @@ -# [520. Detect Capital](https://leetcode-cn.com/problems/detect-capital/) +# [520. Detect Capital](https://leetcode.com/problems/detect-capital/) ## 题目 @@ -44,11 +44,13 @@ Output: false ## 解题思路 -- 把word分别转换为全部小写wLower,全部大写wUpper,首字母大写的字符串wCaptial -- 判断word是否等于wLower,wUpper,wCaptial中的一个,如果是返回true,否则返回false +- 把 word 分别转换为全部小写 wLower,全部大写 wUpper,首字母大写的字符串 wCaptial +- 判断 word 是否等于 wLower, wUpper, wCaptial 中的一个,如果是返回 true,否则返回 false ## 代码 + ```go + package leetcode import "strings" @@ -62,4 +64,5 @@ func detectCapitalUse(word string) bool { } return false } + ``` \ No newline at end of file diff --git a/website/content/ChapterFour/0500~0599/0518.Coin-Change-2.md b/website/content/ChapterFour/0500~0599/0518.Coin-Change-2.md index f3428cd1e..03bf2d1c8 100644 --- a/website/content/ChapterFour/0500~0599/0518.Coin-Change-2.md +++ b/website/content/ChapterFour/0500~0599/0518.Coin-Change-2.md @@ -76,5 +76,5 @@ func change(amount int, coins []int) int { ----------------------------------------------

⬅️上一页

-

下一页➡️

+

下一页➡️

diff --git a/website/content/ChapterFour/0500~0599/0520.Detect-Capital.md b/website/content/ChapterFour/0500~0599/0520.Detect-Capital.md new file mode 100644 index 000000000..40f8156d0 --- /dev/null +++ b/website/content/ChapterFour/0500~0599/0520.Detect-Capital.md @@ -0,0 +1,75 @@ +# [520. Detect Capital](https://leetcode.com/problems/detect-capital/) + + +## 题目 + +We define the usage of capitals in a word to be right when one of the following cases holds: + +All letters in this word are capitals, like "USA". + +All letters in this word are not capitals, like "leetcode". + +Only the first letter in this word is capital, like "Google". + +Given a string word, return true if the usage of capitals in it is right. + +**Example 1:** + +``` +Input: word = "USA" +Output: true +``` + +**Example 2:** + +``` +Input: word = "FlaG" +Output: false +``` + +**Constraints:** + +- 1 <= word.length <= 100 +- word consists of lowercase and uppercase English letters. + +## 题目大意 + +我们定义,在以下情况时,单词的大写用法是正确的: + +全部字母都是大写,比如 "USA" 。 +单词中所有字母都不是大写,比如 "leetcode" 。 +如果单词不只含有一个字母,只有首字母大写,比如"Google" 。 + +给你一个字符串 word 。如果大写用法正确,返回 true ;否则,返回 false 。 + +## 解题思路 + +- 把 word 分别转换为全部小写 wLower,全部大写 wUpper,首字母大写的字符串 wCaptial +- 判断 word 是否等于 wLower, wUpper, wCaptial 中的一个,如果是返回 true,否则返回 false + +## 代码 + +```go + +package leetcode + +import "strings" + +func detectCapitalUse(word string) bool { + wLower := strings.ToLower(word) + wUpper := strings.ToUpper(word) + wCaptial := strings.ToUpper(string(word[0])) + strings.ToLower(string(word[1:])) + if wCaptial == word || wLower == word || wUpper == word { + return true + } + return false +} + +``` + + +---------------------------------------------- +
+

⬅️上一页

+

下一页➡️

+
diff --git a/website/content/ChapterFour/0500~0599/0523.Continuous-Subarray-Sum.md b/website/content/ChapterFour/0500~0599/0523.Continuous-Subarray-Sum.md index 188d9f8d2..671295e2a 100644 --- a/website/content/ChapterFour/0500~0599/0523.Continuous-Subarray-Sum.md +++ b/website/content/ChapterFour/0500~0599/0523.Continuous-Subarray-Sum.md @@ -77,6 +77,6 @@ func checkSubarraySum(nums []int, k int) bool { ----------------------------------------------
-

⬅️上一页

+

⬅️上一页

下一页➡️

diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index b5926c35a..ab9015815 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -134,10 +134,10 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |0816|Ambiguous Coordinates|[Go]({{< relref "/ChapterFour/0800~0899/0816.Ambiguous-Coordinates.md" >}})|Medium||||55.7%| |0842|Split Array into Fibonacci Sequence|[Go]({{< relref "/ChapterFour/0800~0899/0842.Split-Array-into-Fibonacci-Sequence.md" >}})|Medium| O(n^2)| O(1)|❤️|37.4%| |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard| O(n log n)| O(n)||79.2%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||49.1%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||49.0%| |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|76.1%| |1239|Maximum Length of a Concatenated String with Unique Characters|[Go]({{< relref "/ChapterFour/1200~1299/1239.Maximum-Length-of-a-Concatenated-String-with-Unique-Characters.md" >}})|Medium||||50.6%| -|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.6%| +|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.7%| |------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Bit_Manipulation.md b/website/content/ChapterTwo/Bit_Manipulation.md index 68217fb2e..f736f5daf 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -86,14 +86,14 @@ X & ~X = 0 |0898|Bitwise ORs of Subarrays|[Go]({{< relref "/ChapterFour/0800~0899/0898.Bitwise-ORs-of-Subarrays.md" >}})|Medium| O(n)| O(1)||36.2%| |0980|Unique Paths III|[Go]({{< relref "/ChapterFour/0900~0999/0980.Unique-Paths-III.md" >}})|Hard||||79.2%| |0995|Minimum Number of K Consecutive Bit Flips|[Go]({{< relref "/ChapterFour/0900~0999/0995.Minimum-Number-of-K-Consecutive-Bit-Flips.md" >}})|Hard||||50.3%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard||||49.1%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard||||49.0%| |1178|Number of Valid Words for Each Puzzle|[Go]({{< relref "/ChapterFour/1100~1199/1178.Number-of-Valid-Words-for-Each-Puzzle.md" >}})|Hard||||46.8%| |1239|Maximum Length of a Concatenated String with Unique Characters|[Go]({{< relref "/ChapterFour/1200~1299/1239.Maximum-Length-of-a-Concatenated-String-with-Unique-Characters.md" >}})|Medium||||50.6%| |1310|XOR Queries of a Subarray|[Go]({{< relref "/ChapterFour/1300~1399/1310.XOR-Queries-of-a-Subarray.md" >}})|Medium||||70.7%| |1442|Count Triplets That Can Form Two Arrays of Equal XOR|[Go]({{< relref "/ChapterFour/1400~1499/1442.Count-Triplets-That-Can-Form-Two-Arrays-of-Equal-XOR.md" >}})|Medium||||73.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%| |1486|XOR Operation in an Array|[Go]({{< relref "/ChapterFour/1400~1499/1486.XOR-Operation-in-an-Array.md" >}})|Easy||||84.0%| -|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.6%| +|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.7%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||36.8%| |1680|Concatenation of Consecutive Binary Numbers|[Go]({{< relref "/ChapterFour/1600~1699/1680.Concatenation-of-Consecutive-Binary-Numbers.md" >}})|Medium||||52.5%| |1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}})|Hard||||36.6%| diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index 5b4412611..f72f21ce0 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -40,7 +40,7 @@ weight: 9 |0297|Serialize and Deserialize Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}})|Hard||||52.2%| |0329|Longest Increasing Path in a Matrix|[Go]({{< relref "/ChapterFour/0300~0399/0329.Longest-Increasing-Path-in-a-Matrix.md" >}})|Hard||||48.4%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.5%| -|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||57.6%| +|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||57.5%| |0385|Mini Parser|[Go]({{< relref "/ChapterFour/0300~0399/0385.Mini-Parser.md" >}})|Medium||||35.3%| |0386|Lexicographical Numbers|[Go]({{< relref "/ChapterFour/0300~0399/0386.Lexicographical-Numbers.md" >}})|Medium||||57.0%| |0399|Evaluate Division|[Go]({{< relref "/ChapterFour/0300~0399/0399.Evaluate-Division.md" >}})|Medium||||56.0%| diff --git a/website/content/ChapterTwo/Dynamic_Programming.md b/website/content/ChapterTwo/Dynamic_Programming.md index 5acdb6e1d..8e611c401 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -84,7 +84,7 @@ weight: 7 |0920|Number of Music Playlists|[Go]({{< relref "/ChapterFour/0900~0999/0920.Number-of-Music-Playlists.md" >}})|Hard||||48.8%| |0968|Binary Tree Cameras|[Go]({{< relref "/ChapterFour/0900~0999/0968.Binary-Tree-Cameras.md" >}})|Hard||||41.2%| |0978|Longest Turbulent Subarray|[Go]({{< relref "/ChapterFour/0900~0999/0978.Longest-Turbulent-Subarray.md" >}})|Medium||||47.5%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard||||49.1%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard||||49.0%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.4%| |1048|Longest String Chain|[Go]({{< relref "/ChapterFour/1000~1099/1048.Longest-String-Chain.md" >}})|Medium||||57.1%| |1049|Last Stone Weight II|[Go]({{< relref "/ChapterFour/1000~1099/1049.Last-Stone-Weight-II.md" >}})|Medium||||49.5%| @@ -97,7 +97,7 @@ weight: 7 |1646|Get Maximum in Generated Array|[Go]({{< relref "/ChapterFour/1600~1699/1646.Get-Maximum-in-Generated-Array.md" >}})|Easy||||51.3%| |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||54.0%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||25.7%| -|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.6%| +|1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||40.7%| |1659|Maximize Grid Happiness|[Go]({{< relref "/ChapterFour/1600~1699/1659.Maximize-Grid-Happiness.md" >}})|Hard||||36.8%| |1664|Ways to Make a Fair Array|[Go]({{< relref "/ChapterFour/1600~1699/1664.Ways-to-Make-a-Fair-Array.md" >}})|Medium||||62.4%| |1681|Minimum Incompatibility|[Go]({{< relref "/ChapterFour/1600~1699/1681.Minimum-Incompatibility.md" >}})|Hard||||36.6%| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index c29126f8b..1f4d601e6 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -98,7 +98,7 @@ weight: 12 |0976|Largest Perimeter Triangle|[Go]({{< relref "/ChapterFour/0900~0999/0976.Largest-Perimeter-Triangle.md" >}})|Easy| O(n log n)| O(log n) ||59.9%| |0989|Add to Array-Form of Integer|[Go]({{< relref "/ChapterFour/0900~0999/0989.Add-to-Array-Form-of-Integer.md" >}})|Easy||||45.1%| |0991|Broken Calculator|[Go]({{< relref "/ChapterFour/0900~0999/0991.Broken-Calculator.md" >}})|Medium||||50.0%| -|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||49.1%| +|0996|Number of Squareful Arrays|[Go]({{< relref "/ChapterFour/0900~0999/0996.Number-of-Squareful-Arrays.md" >}})|Hard| O(n log n)| O(n) ||49.0%| |1006|Clumsy Factorial|[Go]({{< relref "/ChapterFour/1000~1099/1006.Clumsy-Factorial.md" >}})|Medium||||54.3%| |1017|Convert to Base -2|[Go]({{< relref "/ChapterFour/1000~1099/1017.Convert-to-Base-2.md" >}})|Medium||||59.6%| |1025|Divisor Game|[Go]({{< relref "/ChapterFour/1000~1099/1025.Divisor-Game.md" >}})|Easy| O(1)| O(1)||66.4%| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index 3d12f82f4..72a36b99e 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -76,6 +76,7 @@ weight: 2 |0474|Ones and Zeroes|[Go]({{< relref "/ChapterFour/0400~0499/0474.Ones-and-Zeroes.md" >}})|Medium||||44.0%| |0488|Zuma Game|[Go]({{< relref "/ChapterFour/0400~0499/0488.Zuma-Game.md" >}})|Hard||||37.6%| |0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500~0599/0500.Keyboard-Row.md" >}})|Easy||||67.1%| +|0520|Detect Capital|[Go]({{< relref "/ChapterFour/0500~0599/0520.Detect-Capital.md" >}})|Easy||||54.2%| |0524|Longest Word in Dictionary through Deleting|[Go]({{< relref "/ChapterFour/0500~0599/0524.Longest-Word-in-Dictionary-through-Deleting.md" >}})|Medium||||50.7%| |0535|Encode and Decode TinyURL|[Go]({{< relref "/ChapterFour/0500~0599/0535.Encode-and-Decode-TinyURL.md" >}})|Medium||||83.1%| |0537|Complex Number Multiplication|[Go]({{< relref "/ChapterFour/0500~0599/0537.Complex-Number-Multiplication.md" >}})|Medium||||70.9%| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index ec8f29928..982c3a9ba 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -45,7 +45,7 @@ weight: 6 |0297|Serialize and Deserialize Binary Tree|[Go]({{< relref "/ChapterFour/0200~0299/0297.Serialize-and-Deserialize-Binary-Tree.md" >}})|Hard||||52.2%| |0331|Verify Preorder Serialization of a Binary Tree|[Go]({{< relref "/ChapterFour/0300~0399/0331.Verify-Preorder-Serialization-of-a-Binary-Tree.md" >}})|Medium||||43.4%| |0337|House Robber III|[Go]({{< relref "/ChapterFour/0300~0399/0337.House-Robber-III.md" >}})|Medium||||52.5%| -|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||57.6%| +|0341|Flatten Nested List Iterator|[Go]({{< relref "/ChapterFour/0300~0399/0341.Flatten-Nested-List-Iterator.md" >}})|Medium||||57.5%| |0404|Sum of Left Leaves|[Go]({{< relref "/ChapterFour/0400~0499/0404.Sum-of-Left-Leaves.md" >}})|Easy| O(n)| O(1)||54.2%| |0429|N-ary Tree Level Order Traversal|[Go]({{< relref "/ChapterFour/0400~0499/0429.N-ary-Tree-Level-Order-Traversal.md" >}})|Medium||||68.2%| |0437|Path Sum III|[Go]({{< relref "/ChapterFour/0400~0499/0437.Path-Sum-III.md" >}})|Medium| O(n)| O(1)||49.7%|