render chapter two

This commit is contained in:
YDZ
2021-01-16 00:27:26 +08:00
parent 4614f589ec
commit 1a51946f5d
28 changed files with 822 additions and 490 deletions

View File

@ -5,39 +5,74 @@ type: docs
# Hash Table
| Title | Solution | Difficulty | Time | Space |收藏|
| ----- | :--------: | :----------: | :----: | :-----: | :-----: |
|1. Two Sum | [Go]({{< relref "/ChapterFour/0001.Two-Sum.md" >}})| Easy | O(n)| O(n)||
|3. Longest Substring Without Repeating Characters | [Go]({{< relref "/ChapterFour/0003.Longest-Substring-Without-Repeating-Characters.md" >}})| Medium | O(n)| O(1)|❤️|
|18. 4Sum | [Go]({{< relref "/ChapterFour/0018.4Sum.md" >}})| Medium | O(n^3)| O(n^2)|❤️|
|30. Substring with Concatenation of All Words | [Go]({{< relref "/ChapterFour/0030.Substring-with-Concatenation-of-All-Words.md" >}})| Hard | O(n)| O(n)|❤️|
|36. Valid Sudoku | [Go]({{< relref "/ChapterFour/0036.Valid-Sudoku.md" >}})| Medium | O(n^2)| O(n^2)||
|37. Sudoku Solver | [Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})| Hard | O(n^2)| O(n^2)|❤️|
|49. Group Anagrams | [Go]({{< relref "/ChapterFour/0049.Group-Anagrams.md" >}})| Medium | O(n log n)| O(n)||
|76. Minimum Window Substring | [Go]({{< relref "/ChapterFour/0076.Minimum-Window-Substring.md" >}})| Hard | O(n)| O(n)|❤️|
|94. Binary Tree Inorder Traversal | [Go]({{< relref "/ChapterFour/0094.Binary-Tree-Inorder-Traversal.md" >}})| Medium | O(n)| O(1)||
|138. Copy List with Random Pointer | [Go]()| Medium | O(n)| O(1)||
|202. Happy Number | [Go]({{< relref "/ChapterFour/0202.Happy-Number.md" >}})| Easy | O(log n)| O(1)||
|205. Isomorphic Strings | [Go]({{< relref "/ChapterFour/0205.Isomorphic-Strings.md" >}})| Easy | O(log n)| O(n)||
|217. Contains Duplicate | [Go]({{< relref "/ChapterFour/0217.Contains-Duplicate.md" >}})| Easy | O(n)| O(n)||
|219. Contains Duplicate II | [Go]({{< relref "/ChapterFour/0219.Contains-Duplicate-II.md" >}})| Easy | O(n)| O(n)||
|242. Valid Anagram | [Go]({{< relref "/ChapterFour/0242.Valid-Anagram.md" >}})| Easy | O(n)| O(n) ||
|274. H-Index | [Go]({{< relref "/ChapterFour/0274.H-Index.md" >}})| Medium | O(n)| O(n) ||
|290. Word Pattern | [Go]({{< relref "/ChapterFour/0290.Word-Pattern.md" >}})| Easy | O(n)| O(n) ||
|347. Top K Frequent Elements | [Go]({{< relref "/ChapterFour/0347.Top-K-Frequent-Elements.md" >}})| Medium | O(n)| O(n) ||
|349. Intersection of Two Arrays | [Go]({{< relref "/ChapterFour/0349.Intersection-of-Two-Arrays.md" >}})| Easy | O(n)| O(n) ||
|350. Intersection of Two Arrays II | [Go]({{< relref "/ChapterFour/0350.Intersection-of-Two-Arrays-II.md" >}})| Easy | O(n)| O(n) ||
|438. Find All Anagrams in a String | [Go]({{< relref "/ChapterFour/0438.Find-All-Anagrams-in-a-String.md" >}})| Easy | O(n)| O(1) ||
|447. Number of Boomerangs | [Go]({{< relref "/ChapterFour/0447.Number-of-Boomerangs.md" >}})| Easy | O(n)| O(1) ||
|451. Sort Characters By Frequency | [Go]({{< relref "/ChapterFour/0451.Sort-Characters-By-Frequency.md" >}})| Medium | O(n log n)| O(1) ||
|454. 4Sum II | [Go]({{< relref "/ChapterFour/0454.4Sum-II.md" >}})| Medium | O(n^2)| O(n) ||
|648. Replace Words | [Go]({{< relref "/ChapterFour/0648.Replace-Words.md" >}})| Medium | O(n)| O(n) ||
|676. Implement Magic Dictionary | [Go]({{< relref "/ChapterFour/0676.Implement-Magic-Dictionary.md" >}})| Medium | O(n)| O(n) ||
|720. Longest Word in Dictionary | [Go]({{< relref "/ChapterFour/0720.Longest-Word-in-Dictionary.md" >}})| Easy | O(n)| O(n) ||
|726. Number of Atoms | [Go]({{< relref "/ChapterFour/0726.Number-of-Atoms.md" >}})| Hard | O(n)| O(n) |❤️|
|739. Daily Temperatures | [Go]({{< relref "/ChapterFour/0739.Daily-Temperatures.md" >}})| Medium | O(n)| O(n) ||
|710. Random Pick with Blacklist | [Go]({{< relref "/ChapterFour/0710.Random-Pick-with-Blacklist.md" >}})| Hard | O(n)| O(n) ||
|895. Maximum Frequency Stack | [Go]({{< relref "/ChapterFour/0895.Maximum-Frequency-Stack.md" >}})| Hard | O(n)| O(n) ||
|930. Binary Subarrays With Sum | [Go]({{< relref "/ChapterFour/0930.Binary-Subarrays-With-Sum.md" >}})| Medium | O(n)| O(n) |❤️|
|992. Subarrays with K Different Integers | [Go]({{< relref "/ChapterFour/0992.Subarrays-with-K-Different-Integers.md" >}})| Hard | O(n)| O(n) |❤️|
|---------------------------------------|---------------------------------|--------------------------|-----------------------|-----------|--------|
| No. | Title | Solution | Difficulty | TimeComplexity | SpaceComplexity |Favorite| Acceptance |
|:--------:|:------- | :--------: | :----------: | :----: | :-----: | :-----: |:-----: |
|0001|Two Sum|[Go]({{< relref "/ChapterFour/0001.Two-Sum.md" >}})|Easy| O(n)| O(n)||46.2%|
|0003|Longest Substring Without Repeating Characters|[Go]({{< relref "/ChapterFour/0003.Longest-Substring-Without-Repeating-Characters.md" >}})|Medium| O(n)| O(1)|❤️|31.3%|
|0018|4Sum|[Go]({{< relref "/ChapterFour/0018.4Sum.md" >}})|Medium| O(n^3)| O(n^2)|❤️|34.6%|
|0030|Substring with Concatenation of All Words|[Go]({{< relref "/ChapterFour/0030.Substring-with-Concatenation-of-All-Words.md" >}})|Hard| O(n)| O(n)|❤️|26.0%|
|0036|Valid Sudoku|[Go]({{< relref "/ChapterFour/0036.Valid-Sudoku.md" >}})|Medium| O(n^2)| O(n^2)||50.2%|
|0037|Sudoku Solver|[Go]({{< relref "/ChapterFour/0037.Sudoku-Solver.md" >}})|Hard| O(n^2)| O(n^2)|❤️|45.9%|
|0049|Group Anagrams|[Go]({{< relref "/ChapterFour/0049.Group-Anagrams.md" >}})|Medium| O(n log n)| O(n)||58.8%|
|0076|Minimum Window Substring|[Go]({{< relref "/ChapterFour/0076.Minimum-Window-Substring.md" >}})|Hard| O(n)| O(n)|❤️|35.7%|
|0094|Binary Tree Inorder Traversal|[Go]({{< relref "/ChapterFour/0094.Binary-Tree-Inorder-Traversal.md" >}})|Medium| O(n)| O(1)||65.4%|
|0136|Single Number|[Go]({{< relref "/ChapterFour/0136.Single-Number.md" >}})|Easy||||66.4%|
|0187|Repeated DNA Sequences|[Go]({{< relref "/ChapterFour/0187.Repeated-DNA-Sequences.md" >}})|Medium||||41.2%|
|0202|Happy Number|[Go]({{< relref "/ChapterFour/0202.Happy-Number.md" >}})|Easy| O(log n)| O(1)||51.1%|
|0204|Count Primes|[Go]({{< relref "/ChapterFour/0204.Count-Primes.md" >}})|Easy||||32.1%|
|0205|Isomorphic Strings|[Go]({{< relref "/ChapterFour/0205.Isomorphic-Strings.md" >}})|Easy| O(log n)| O(n)||40.3%|
|0217|Contains Duplicate|[Go]({{< relref "/ChapterFour/0217.Contains-Duplicate.md" >}})|Easy| O(n)| O(n)||56.5%|
|0219|Contains Duplicate II|[Go]({{< relref "/ChapterFour/0219.Contains-Duplicate-II.md" >}})|Easy| O(n)| O(n)||38.5%|
|0242|Valid Anagram|[Go]({{< relref "/ChapterFour/0242.Valid-Anagram.md" >}})|Easy| O(n)| O(n) ||57.9%|
|0274|H-Index|[Go]({{< relref "/ChapterFour/0274.H-Index.md" >}})|Medium| O(n)| O(n) ||36.3%|
|0290|Word Pattern|[Go]({{< relref "/ChapterFour/0290.Word-Pattern.md" >}})|Easy| O(n)| O(n) ||38.2%|
|0347|Top K Frequent Elements|[Go]({{< relref "/ChapterFour/0347.Top-K-Frequent-Elements.md" >}})|Medium| O(n)| O(n) ||62.2%|
|0349|Intersection of Two Arrays|[Go]({{< relref "/ChapterFour/0349.Intersection-of-Two-Arrays.md" >}})|Easy| O(n)| O(n) ||64.4%|
|0350|Intersection of Two Arrays II|[Go]({{< relref "/ChapterFour/0350.Intersection-of-Two-Arrays-II.md" >}})|Easy| O(n)| O(n) ||51.9%|
|0387|First Unique Character in a String|[Go]({{< relref "/ChapterFour/0387.First-Unique-Character-in-a-String.md" >}})|Easy||||53.7%|
|0389|Find the Difference|[Go]({{< relref "/ChapterFour/0389.Find-the-Difference.md" >}})|Easy||||57.7%|
|0409|Longest Palindrome|[Go]({{< relref "/ChapterFour/0409.Longest-Palindrome.md" >}})|Easy||||52.1%|
|0438|Find All Anagrams in a String|[Go]({{< relref "/ChapterFour/0438.Find-All-Anagrams-in-a-String.md" >}})|Medium| O(n)| O(1) ||44.7%|
|0447|Number of Boomerangs|[Go]({{< relref "/ChapterFour/0447.Number-of-Boomerangs.md" >}})|Medium| O(n)| O(1) ||52.3%|
|0451|Sort Characters By Frequency|[Go]({{< relref "/ChapterFour/0451.Sort-Characters-By-Frequency.md" >}})|Medium| O(n log n)| O(1) ||64.1%|
|0454|4Sum II|[Go]({{< relref "/ChapterFour/0454.4Sum-II.md" >}})|Medium| O(n^2)| O(n) ||54.5%|
|0463|Island Perimeter|[Go]({{< relref "/ChapterFour/0463.Island-Perimeter.md" >}})|Easy||||66.5%|
|0500|Keyboard Row|[Go]({{< relref "/ChapterFour/0500.Keyboard-Row.md" >}})|Easy||||65.5%|
|0508|Most Frequent Subtree Sum|[Go]({{< relref "/ChapterFour/0508.Most-Frequent-Subtree-Sum.md" >}})|Medium||||58.9%|
|0575|Distribute Candies|[Go]({{< relref "/ChapterFour/0575.Distribute-Candies.md" >}})|Easy||||61.9%|
|0594|Longest Harmonious Subsequence|[Go]({{< relref "/ChapterFour/0594.Longest-Harmonious-Subsequence.md" >}})|Easy||||47.7%|
|0599|Minimum Index Sum of Two Lists|[Go]({{< relref "/ChapterFour/0599.Minimum-Index-Sum-of-Two-Lists.md" >}})|Easy||||51.5%|
|0632|Smallest Range Covering Elements from K Lists|[Go]({{< relref "/ChapterFour/0632.Smallest-Range-Covering-Elements-from-K-Lists.md" >}})|Hard||||53.9%|
|0645|Set Mismatch|[Go]({{< relref "/ChapterFour/0645.Set-Mismatch.md" >}})|Easy||||42.5%|
|0648|Replace Words|[Go]({{< relref "/ChapterFour/0648.Replace-Words.md" >}})|Medium| O(n)| O(n) ||58.2%|
|0676|Implement Magic Dictionary|[Go]({{< relref "/ChapterFour/0676.Implement-Magic-Dictionary.md" >}})|Medium| O(n)| O(n) ||55.1%|
|0705|Design HashSet|[Go]({{< relref "/ChapterFour/0705.Design-HashSet.md" >}})|Easy||||64.6%|
|0706|Design HashMap|[Go]({{< relref "/ChapterFour/0706.Design-HashMap.md" >}})|Easy||||62.5%|
|0710|Random Pick with Blacklist|[Go]({{< relref "/ChapterFour/0710.Random-Pick-with-Blacklist.md" >}})|Hard| O(n)| O(n) ||32.7%|
|0718|Maximum Length of Repeated Subarray|[Go]({{< relref "/ChapterFour/0718.Maximum-Length-of-Repeated-Subarray.md" >}})|Medium||||50.1%|
|0720|Longest Word in Dictionary|[Go]({{< relref "/ChapterFour/0720.Longest-Word-in-Dictionary.md" >}})|Easy| O(n)| O(n) ||49.0%|
|0726|Number of Atoms|[Go]({{< relref "/ChapterFour/0726.Number-of-Atoms.md" >}})|Hard| O(n)| O(n) |❤️|51.0%|
|0739|Daily Temperatures|[Go]({{< relref "/ChapterFour/0739.Daily-Temperatures.md" >}})|Medium| O(n)| O(n) ||64.3%|
|0748|Shortest Completing Word|[Go]({{< relref "/ChapterFour/0748.Shortest-Completing-Word.md" >}})|Easy||||57.4%|
|0771|Jewels and Stones|[Go]({{< relref "/ChapterFour/0771.Jewels-and-Stones.md" >}})|Easy||||86.8%|
|0781|Rabbits in Forest|[Go]({{< relref "/ChapterFour/0781.Rabbits-in-Forest.md" >}})|Medium||||55.4%|
|0811|Subdomain Visit Count|[Go]({{< relref "/ChapterFour/0811.Subdomain-Visit-Count.md" >}})|Easy||||71.2%|
|0884|Uncommon Words from Two Sentences|[Go]({{< relref "/ChapterFour/0884.Uncommon-Words-from-Two-Sentences.md" >}})|Easy||||63.9%|
|0895|Maximum Frequency Stack|[Go]({{< relref "/ChapterFour/0895.Maximum-Frequency-Stack.md" >}})|Hard| O(n)| O(n) ||62.1%|
|0930|Binary Subarrays With Sum|[Go]({{< relref "/ChapterFour/0930.Binary-Subarrays-With-Sum.md" >}})|Medium| O(n)| O(n) |❤️|44.3%|
|0953|Verifying an Alien Dictionary|[Go]({{< relref "/ChapterFour/0953.Verifying-an-Alien-Dictionary.md" >}})|Easy||||52.5%|
|0961|N-Repeated Element in Size 2N Array|[Go]({{< relref "/ChapterFour/0961.N-Repeated-Element-in-Size-2N-Array.md" >}})|Easy||||74.4%|
|0970|Powerful Integers|[Go]({{< relref "/ChapterFour/0970.Powerful-Integers.md" >}})|Easy||||39.9%|
|0981|Time Based Key-Value Store|[Go]({{< relref "/ChapterFour/0981.Time-Based-Key-Value-Store.md" >}})|Medium||||53.9%|
|0992|Subarrays with K Different Integers|[Go]({{< relref "/ChapterFour/0992.Subarrays-with-K-Different-Integers.md" >}})|Hard| O(n)| O(n) |❤️|50.4%|
|1002|Find Common Characters|[Go]({{< relref "/ChapterFour/1002.Find-Common-Characters.md" >}})|Easy||||68.1%|
|1078|Occurrences After Bigram|[Go]({{< relref "/ChapterFour/1078.Occurrences-After-Bigram.md" >}})|Easy||||64.9%|
|1160|Find Words That Can Be Formed by Characters|[Go]({{< relref "/ChapterFour/1160.Find-Words-That-Can-Be-Formed-by-Characters.md" >}})|Easy||||67.5%|
|1189|Maximum Number of Balloons|[Go]({{< relref "/ChapterFour/1189.Maximum-Number-of-Balloons.md" >}})|Easy||||61.8%|
|1207|Unique Number of Occurrences|[Go]({{< relref "/ChapterFour/1207.Unique-Number-of-Occurrences.md" >}})|Easy||||71.6%|
|1512|Number of Good Pairs|[Go]({{< relref "/ChapterFour/1512.Number-of-Good-Pairs.md" >}})|Easy||||87.9%|
|1539|Kth Missing Positive Number|[Go]({{< relref "/ChapterFour/1539.Kth-Missing-Positive-Number.md" >}})|Easy||||55.3%|
|1640|Check Array Formation Through Concatenation|[Go]({{< relref "/ChapterFour/1640.Check-Array-Formation-Through-Concatenation.md" >}})|Easy||||62.3%|
|1679|Max Number of K-Sum Pairs|[Go]({{< relref "/ChapterFour/1679.Max-Number-of-K-Sum-Pairs.md" >}})|Medium||||52.0%|
|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|