diff --git a/ctl/models/tagproblem.go b/ctl/models/tagproblem.go index 5bc04ab8c..55c64f7f7 100644 --- a/ctl/models/tagproblem.go +++ b/ctl/models/tagproblem.go @@ -188,8 +188,7 @@ func (tls TagLists) table() string { for _, p := range tls.TagLists { res += p.tableLine() } - // 加这一行是为了撑开整个表格 - res += "|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|" + // 网页主题表格为 width:100%,不需要占位行来撑开宽度,故不再追加 "---" 占位行。 return res } diff --git a/ctl/pdf.go b/ctl/pdf.go index 14b890974..324610266 100644 --- a/ctl/pdf.go +++ b/ctl/pdf.go @@ -87,12 +87,38 @@ func generatePDF() { if err != nil { fmt.Println(err) } + // 动态删除表格中多余的 "---" 占位行(仅影响 PDF 输出,不改动网页源文件) + pdf = removeTablePlaceholder(pdf) // 生成 PDF util.WriteFile(fmt.Sprintf("../PDF v%v.%v.%v.md", majorVersion, midVersion, lastVersion), pdf) // 还原现场 util.DestoryDir("./pdftemp") } +// removeTablePlaceholder 删除表格里多余的纯破折号占位行(如 +// "|------------|------------|...|")。真正的 GFM 分隔行带对齐冒号且后面紧跟 +// 数据行,这里通过「不含冒号」且「下一行不是表格行」来精确区分,避免误删。 +var tablePlaceholderRe = regexp.MustCompile(`^\s*\|[-\s|]*-[-\s|]*\|\s*$`) + +func removeTablePlaceholder(content []byte) []byte { + lines := strings.Split(string(content), "\n") + out := make([]string, 0, len(lines)) + for i, line := range lines { + if tablePlaceholderRe.MatchString(line) && !strings.Contains(line, ":") { + next := "" + if i+1 < len(lines) { + next = strings.TrimSpace(lines[i+1]) + } + // 分隔行后面会紧跟数据行(以 | 开头);占位行后面不是表格行 → 删除 + if !strings.HasPrefix(next, "|") { + continue + } + } + out = append(out, line) + } + return []byte(strings.Join(out, "\n")) +} + func loadChapter(order []string, path, chapter string) ([]byte, error) { var ( res, tmp []byte diff --git a/ctl/render.go b/ctl/render.go index 3e62a36eb..6d7bd47da 100644 --- a/ctl/render.go +++ b/ctl/render.go @@ -174,12 +174,22 @@ func buildChapterTwo(internal bool) { for index, tag := range chapterTwoSlug { body := getTagProblemList(tag) // fmt.Printf("%v\n", string(body)) + // 返回值校验:接口为空 / 解析失败 / 未取到题目(多见于被限流)时跳过该 tag, + // 避免后续用空数据继续处理时偶发 panic。跳过的 tag 重新运行即可补齐。 + if len(body) == 0 { + fmt.Printf("跳过 ChapterTwo[%v]:接口返回为空(可能被限流)\n", tag) + continue + } err := json.Unmarshal(body, &gr) if err != nil { - fmt.Println(err) - return + fmt.Printf("跳过 ChapterTwo[%v]:JSON 解析失败 %v\n", tag, err) + continue } questions = gr.Data.TopicTag.Questions + if len(questions) == 0 { + fmt.Printf("跳过 ChapterTwo[%v]:未取到题目数据(可能被限流)\n", tag) + continue + } mdrows := m.ConvertMdModelFromQuestions(questions) sort.Sort(m.SortByQuestionID(mdrows)) solutionIds, _, _ := util.LoadSolutionsDir() @@ -223,6 +233,10 @@ func loadMetaData(filePath string) (map[int]m.TagList, error) { return nil, err } s := strings.Split(string(line), "|") + // 字段不足的行(空行 / 格式异常)直接跳过,避免下面取 s[1]、s[4..6] 时越界 panic + if len(s) < 7 { + continue + } v, _ := strconv.Atoi(strings.Split(s[1], ".")[0]) // v[0] 是题号,s[4] time, s[5] space, s[6] favorite metaMap[v] = m.TagList{ diff --git a/ctl/request.go b/ctl/request.go index 41efa462a..414e871a6 100644 --- a/ctl/request.go +++ b/ctl/request.go @@ -49,8 +49,8 @@ func signin() *request.Request { func getRaw(URL string) []byte { req := newReq() resp, err := req.Get(URL) - if err != nil { - fmt.Printf("getRaw: Get Error: %s\n", err.Error()) + if err != nil || resp == nil { + fmt.Printf("getRaw: Get Error: %v\n", err) return []byte{} } defer resp.Body.Close() @@ -60,9 +60,12 @@ func getRaw(URL string) []byte { fmt.Printf("getRaw: Read Error: %s\n", err.Error()) return []byte{} } - if resp.StatusCode == 200 { - fmt.Println("Get problem Success!") + // 非 200(如被限流的 429)直接返回空,让调用方做返回值校验后跳过,避免拿错误页继续解析 + if resp.StatusCode != 200 { + fmt.Printf("getRaw: non-200 status %d for %s\n", resp.StatusCode, URL) + return []byte{} } + fmt.Println("Get problem Success!") return body } @@ -78,20 +81,23 @@ type Variables struct { func getQraphql(payload string) []byte { req := newReq() resp, err := req.PostForm(QraphqlURL, bytes.NewBuffer([]byte(payload))) - if err != nil { - fmt.Printf("getRaw: Get Error: %s\n", err.Error()) + if err != nil || resp == nil { + fmt.Printf("getQraphql: Post Error: %v\n", err) return []byte{} } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { - fmt.Printf("getRaw: Read Error: %s\n", err.Error()) + fmt.Printf("getQraphql: Read Error: %s\n", err.Error()) return []byte{} } - if resp.StatusCode == 200 { - fmt.Println("Get problem Success!") + // 非 200(如被限流的 429)直接返回空,让调用方做返回值校验后跳过 + if resp.StatusCode != 200 { + fmt.Printf("getQraphql: non-200 status %d\n", resp.StatusCode) + return []byte{} } + fmt.Println("Get problem Success!") return body } diff --git a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color.go b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color.go index 8962f957a..38bc1cfd2 100644 --- a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color.go +++ b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color.go @@ -12,10 +12,10 @@ func winnerOfGame(colors string) bool { Acont = 0 } if Acont >= 3 { - As += Acont - 2 + As++ } if Bcont >= 3 { - Bs += Bcont - 2 + Bs++ } } if As > Bs { diff --git a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color_test.go b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color_test.go index 567eea1fe..4584526d7 100644 --- a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color_test.go +++ b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/2038.Remove Colored Pieces if Both Neighbors are the Same Color_test.go @@ -38,14 +38,24 @@ func Test_Problem2038(t *testing.T) { para2038{"ABBBBBBBAAA"}, ans2038{false}, }, + + { + // 回归用例:两段长度 3 的 B + 一段长度 4 的 A,旧实现会误判为 true + para2038{"AAAABBBABBB"}, + ans2038{false}, + }, } fmt.Printf("------------------------Leetcode Problem 2038------------------------\n") for _, q := range qs { - _, p := q.ans2038, q.para2038 + a, p := q.ans2038, q.para2038 fmt.Printf("【input】:%v ", p.colors) - fmt.Printf("【output】:%v \n", winnerOfGame(p.colors)) + got := winnerOfGame(p.colors) + fmt.Printf("【output】:%v \n", got) + if got != a.ans { + t.Fatalf("winnerOfGame(%q) = %v, want %v", p.colors, got, a.ans) + } } fmt.Printf("\n\n\n") } diff --git a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/README.md b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/README.md index fdf3e5525..ebf08a450 100644 --- a/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/README.md +++ b/leetcode/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color/README.md @@ -91,10 +91,10 @@ func winnerOfGame(colors string) bool { Acont = 0 } if Acont >= 3 { - As += Acont - 2 + As++ } if Bcont >= 3 { - Bs += Bcont - 2 + Bs++ } } if As > Bs { diff --git a/website/content.en/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md b/website/content.en/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md index c1ceb659f..957bc9d98 100644 --- a/website/content.en/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md +++ b/website/content.en/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md @@ -91,10 +91,10 @@ func winnerOfGame(colors string) bool { Acont = 0 } if Acont >= 3 { - As += Acont - 2 + As++ } if Bcont >= 3 { - Bs += Bcont - 2 + Bs++ } } if As > Bs { diff --git a/website/content.en/ChapterOne/Algorithm.md b/website/content.en/ChapterOne/Algorithm.md index 61ec4797e..8cd2529b6 100644 --- a/website/content.en/ChapterOne/Algorithm.md +++ b/website/content.en/ChapterOne/Algorithm.md @@ -24,4 +24,3 @@ The following is algorithm-related knowledge compiled by the author. I hope to e |Geometry||1. Convex Hull - Gift wrapping
2. Convex Hull - Graham scan
3. Line Segment Problems
4. Problems Related to Polygons and Polyhedra
|| |NP-Complete|1. Computational Model
2. P-Class and NP-Class Problems
3. NP-Complete Problems
4. Approximation Algorithms for NP-Complete Problems
|1. Random Access Machine RAM
2. Random Access Stored Program Machine RASP
3. Turing Machine
4. Nondeterministic Turing Machine
5. P-Class and NP-Class Languages
6. Polynomial-Time Verification
7. Polynomial-Time Transformation
8. Cook's Theorem
9. Satisfiability Problem of Conjunctive Normal Form CNF-SAT
10. Satisfiability Problem of 3-Conjunctive Normal Form 3-SAT
11. Clique Problem CLIQUE
12. Vertex Cover Problem VERTEX-COVER
13. Subset Sum Problem SUBSET-SUM
14. Hamiltonian Circuit Problem HAM-CYCLE
15. Traveling Salesman Problem TSP
16. Approximation Algorithm for the Vertex Cover Problem
17. Approximation Algorithm for the Traveling Salesman Problem
18. Traveling Salesman Problem with the Triangle Inequality Property
19. General Traveling Salesman Problem
20. Approximation Algorithm for the Set Cover Problem
21. Approximation Algorithm for the Subset Sum Problem
22. Exponential-Time Algorithm for the Subset Sum Problem
23. Polynomial-Time Approximation Scheme for the Subset Sum Problem
|| |Bit Operations| Bit operations include:
1. NOT
2. Bitwise OR(OR)
3. Bitwise XOR(XOR)
4. Bitwise AND(AND)
5. Shift: It is a binary operator used to move every bit in a binary number in one direction by a specified number of positions; the overflowing part will be discarded, and the vacant part will be filled with a certain value.
| 1.Bitwise AND of Numbers Range
2.UTF-8 Validation
3.Convert a Number to Hexadecimal
4.Find Longest Awesome Substring
5.XOR Operation in an Array
6.Power Set
7.Number of 1 Bits
8.Prime Number of Set Bits in Binary Representation
9.XOR Queries of a Subarray
| [LeetCode: Bit Manipulation](https://leetcode-cn.com/tag/bit-manipulation/)| -|------------|------------------------------------------------------------------|-----------------------------------------------------------------|--------------------| diff --git a/website/content.en/ChapterOne/Data_Structure.md b/website/content.en/ChapterOne/Data_Structure.md index dfa26315f..a080dfd69 100644 --- a/website/content.en/ChapterOne/Data_Structure.md +++ b/website/content.en/ChapterOne/Data_Structure.md @@ -22,4 +22,3 @@ The following is data-structure-related knowledge compiled by the author. I hope |Array-Implemented Heap
Heap|1. Max Heap and Min Heap Max Heap and Min Heap
2. Min-Max Heap
3. Deap Deap
4. d-ary Heap||| |Tree-Implemented Heap
Heap|1. Leftist Tree Leftist Tree/Leftist Heap
2. Flat Heap
3. Binomial Heap
4. Fibonacci Heap Fibonacco Heap
5. Pairing Heap Pairing Heap||| |Search
Search|1. Hash Table Hash
2. Skip List Skip List
3. Binary Sort Tree Binary Sort Tree
4. AVL Tree
5. B Tree / B+ Tree / B* Tree
6. AA Tree
7. Red Black Tree Red Black Tree
8. Binary Heap Binary Heap
9. Splay Tree
10. Double Chained Tree Double Chained Tree
11. Trie Tree
12. R Tree||| -|--------------------------------------------|--------------------------------------------------------------------------------------------|---------------------------|-----------------------------------| diff --git a/website/content.en/ChapterOne/Time_Complexity.md b/website/content.en/ChapterOne/Time_Complexity.md index 6f6a94380..dd9743985 100644 --- a/website/content.en/ChapterOne/Time_Complexity.md +++ b/website/content.en/ChapterOne/Time_Complexity.md @@ -27,7 +27,6 @@ Data scale of problems that can be solved within 1s: 10^6 ~ 10^7 |8|10^9|O(sqrt(n))|Prime sieving, square root calculation| |9|10^10|O(log n)|Binary search| |10|+∞|O(1)|Math-related algorithms| -|------------------------------|------------------------------|------------------------------------------------------------------|------------------------------------------------------------------| Some misleading examples: diff --git a/website/content.en/ChapterTwo/Array.md b/website/content.en/ChapterTwo/Array.md index 18d03f0d5..fd920bc58 100644 --- a/website/content.en/ChapterTwo/Array.md +++ b/website/content.en/ChapterTwo/Array.md @@ -424,4 +424,3 @@ weight: 1 |2170|Minimum Operations to Make the Array Alternating|[Go]({{< relref "/ChapterFour/2100~2199/2170.Minimum-Operations-to-Make-the-Array-Alternating.md" >}})|Medium||||33.2%| |2171|Removing Minimum Number of Magic Beans|[Go]({{< relref "/ChapterFour/2100~2199/2171.Removing-Minimum-Number-of-Magic-Beans.md" >}})|Medium||||42.1%| |2183|Count Array Pairs Divisible by K|[Go]({{< relref "/ChapterFour/2100~2199/2183.Count-Array-Pairs-Divisible-by-K.md" >}})|Hard||||28.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Backtracking.md b/website/content.en/ChapterTwo/Backtracking.md index 146c259e7..703874360 100644 --- a/website/content.en/ChapterTwo/Backtracking.md +++ b/website/content.en/ChapterTwo/Backtracking.md @@ -139,4 +139,3 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|76.0%| |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||||52.2%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||39.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Binary_Indexed_Tree.md b/website/content.en/ChapterTwo/Binary_Indexed_Tree.md index dcc02111a..ae1c0c3f1 100644 --- a/website/content.en/ChapterTwo/Binary_Indexed_Tree.md +++ b/website/content.en/ChapterTwo/Binary_Indexed_Tree.md @@ -17,4 +17,3 @@ weight: 19 |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}})|Hard||||30.9%| |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||41.8%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Binary_Search.md b/website/content.en/ChapterTwo/Binary_Search.md index 6ec565650..1fe22be36 100644 --- a/website/content.en/ChapterTwo/Binary_Search.md +++ b/website/content.en/ChapterTwo/Binary_Search.md @@ -215,4 +215,3 @@ func peakIndexInMountainArray(A []int) int { |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||37.6%| |1818|Minimum Absolute Sum Difference|[Go]({{< relref "/ChapterFour/1800~1899/1818.Minimum-Absolute-Sum-Difference.md" >}})|Medium||||30.4%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Bit_Manipulation.md b/website/content.en/ChapterTwo/Bit_Manipulation.md index 43e35872f..df5e41ade 100644 --- a/website/content.en/ChapterTwo/Bit_Manipulation.md +++ b/website/content.en/ChapterTwo/Bit_Manipulation.md @@ -103,4 +103,3 @@ X & ~X = 0 |1734|Decode XORed Permutation|[Go]({{< relref "/ChapterFour/1700~1799/1734.Decode-XORed-Permutation.md" >}})|Medium||||63.0%| |1738|Find Kth Largest XOR Coordinate Value|[Go]({{< relref "/ChapterFour/1700~1799/1738.Find-Kth-Largest-XOR-Coordinate-Value.md" >}})|Medium||||61.0%| |1763|Longest Nice Substring|[Go]({{< relref "/ChapterFour/1700~1799/1763.Longest-Nice-Substring.md" >}})|Easy||||61.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Breadth_First_Search.md b/website/content.en/ChapterTwo/Breadth_First_Search.md index bb2c827f8..6deaa4ce1 100644 --- a/website/content.en/ChapterTwo/Breadth_First_Search.md +++ b/website/content.en/ChapterTwo/Breadth_First_Search.md @@ -89,4 +89,3 @@ weight: 10 |1609|Even Odd Tree|[Go]({{< relref "/ChapterFour/1600~1699/1609.Even-Odd-Tree.md" >}})|Medium||||54.4%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||29.1%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Depth_First_Search.md b/website/content.en/ChapterTwo/Depth_First_Search.md index b25af6c74..0cd1fb535 100644 --- a/website/content.en/ChapterTwo/Depth_First_Search.md +++ b/website/content.en/ChapterTwo/Depth_First_Search.md @@ -116,4 +116,3 @@ weight: 9 |1600|Throne Inheritance|[Go]({{< relref "/ChapterFour/1600~1699/1600.Throne-Inheritance.md" >}})|Medium||||63.6%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Dynamic_Programming.md b/website/content.en/ChapterTwo/Dynamic_Programming.md index 605d6cdec..8df280c7f 100644 --- a/website/content.en/ChapterTwo/Dynamic_Programming.md +++ b/website/content.en/ChapterTwo/Dynamic_Programming.md @@ -107,4 +107,3 @@ weight: 7 |1691|Maximum Height by Stacking Cuboids|[Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}})|Hard||||54.6%| |1696|Jump Game VI|[Go]({{< relref "/ChapterFour/1600~1699/1696.Jump-Game-VI.md" >}})|Medium||||46.1%| |2167|Minimum Time to Remove All Cars Containing Illegal Goods|[Go]({{< relref "/ChapterFour/2100~2199/2167.Minimum-Time-to-Remove-All-Cars-Containing-Illegal-Goods.md" >}})|Hard||||40.8%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Hash_Table.md b/website/content.en/ChapterTwo/Hash_Table.md index f47100b61..c3378fe48 100644 --- a/website/content.en/ChapterTwo/Hash_Table.md +++ b/website/content.en/ChapterTwo/Hash_Table.md @@ -170,4 +170,3 @@ weight: 13 |2043|Simple Bank System|[Go]({{< relref "/ChapterFour/2000~2099/2043.Simple-Bank-System.md" >}})|Medium||||65.2%| |2166|Design Bitset|[Go]({{< relref "/ChapterFour/2100~2199/2166.Design-Bitset.md" >}})|Medium||||31.8%| |2170|Minimum Operations to Make the Array Alternating|[Go]({{< relref "/ChapterFour/2100~2199/2170.Minimum-Operations-to-Make-the-Array-Alternating.md" >}})|Medium||||33.2%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Linked_List.md b/website/content.en/ChapterTwo/Linked_List.md index f27e6214c..1282bac36 100644 --- a/website/content.en/ChapterTwo/Linked_List.md +++ b/website/content.en/ChapterTwo/Linked_List.md @@ -67,4 +67,3 @@ weight: 4 |1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1600~1699/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||57.2%| |1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||67.1%| |2181|Merge Nodes in Between Zeros|[Go]({{< relref "/ChapterFour/2100~2199/2181.Merge-Nodes-in-Between-Zeros.md" >}})|Medium||||86.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Math.md b/website/content.en/ChapterTwo/Math.md index 3283d49fe..3269ec17a 100644 --- a/website/content.en/ChapterTwo/Math.md +++ b/website/content.en/ChapterTwo/Math.md @@ -150,4 +150,3 @@ weight: 12 |2169|Count Operations to Obtain Zero|[Go]({{< relref "/ChapterFour/2100~2199/2169.Count-Operations-to-Obtain-Zero.md" >}})|Easy||||75.2%| |2180|Count Integers With Even Digit Sum|[Go]({{< relref "/ChapterFour/2100~2199/2180.Count-Integers-With-Even-Digit-Sum.md" >}})|Easy||||65.5%| |2183|Count Array Pairs Divisible by K|[Go]({{< relref "/ChapterFour/2100~2199/2183.Count-Array-Pairs-Divisible-by-K.md" >}})|Hard||||28.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Segment_Tree.md b/website/content.en/ChapterTwo/Segment_Tree.md index f8696077a..91cb4812d 100644 --- a/website/content.en/ChapterTwo/Segment_Tree.md +++ b/website/content.en/ChapterTwo/Segment_Tree.md @@ -49,4 +49,3 @@ Segment tree [problem types](https://blog.csdn.net/xuechelingxiao/article/detail |0850|Rectangle Area II|[Go]({{< relref "/ChapterFour/0800~0899/0850.Rectangle-Area-II.md" >}})|Hard| O(n log n)| O(n)|❤️|53.9%| |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard| O(log n)| O(n)|❤️|41.8%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Sliding_Window.md b/website/content.en/ChapterTwo/Sliding_Window.md index e65d6e45b..0ca1e3d05 100644 --- a/website/content.en/ChapterTwo/Sliding_Window.md +++ b/website/content.en/ChapterTwo/Sliding_Window.md @@ -64,4 +64,3 @@ weight: 17 |1696|Jump Game VI|[Go]({{< relref "/ChapterFour/1600~1699/1696.Jump-Game-VI.md" >}})|Medium||||46.1%| |1763|Longest Nice Substring|[Go]({{< relref "/ChapterFour/1700~1799/1763.Longest-Nice-Substring.md" >}})|Easy||||61.5%| |1984|Minimum Difference Between Highest and Lowest of K Scores|[Go]({{< relref "/ChapterFour/1900~1999/1984.Minimum-Difference-Between-Highest-and-Lowest-of-K-Scores.md" >}})|Easy||||54.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Sorting.md b/website/content.en/ChapterTwo/Sorting.md index 35b43dda9..f9752e7a6 100644 --- a/website/content.en/ChapterTwo/Sorting.md +++ b/website/content.en/ChapterTwo/Sorting.md @@ -126,4 +126,3 @@ weight: 14 |2164|Sort Even and Odd Indices Independently|[Go]({{< relref "/ChapterFour/2100~2199/2164.Sort-Even-and-Odd-Indices-Independently.md" >}})|Easy||||65.0%| |2165|Smallest Value of the Rearranged Number|[Go]({{< relref "/ChapterFour/2100~2199/2165.Smallest-Value-of-the-Rearranged-Number.md" >}})|Medium||||51.4%| |2171|Removing Minimum Number of Magic Beans|[Go]({{< relref "/ChapterFour/2100~2199/2171.Removing-Minimum-Number-of-Magic-Beans.md" >}})|Medium||||42.1%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Stack.md b/website/content.en/ChapterTwo/Stack.md index fc3258f91..89bdce7ce 100644 --- a/website/content.en/ChapterTwo/Stack.md +++ b/website/content.en/ChapterTwo/Stack.md @@ -74,4 +74,3 @@ weight: 5 |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||58.9%| |1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1600~1699/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||49.3%| |1700|Number of Students Unable to Eat Lunch|[Go]({{< relref "/ChapterFour/1700~1799/1700.Number-of-Students-Unable-to-Eat-Lunch.md" >}})|Easy||||68.7%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/String.md b/website/content.en/ChapterTwo/String.md index 650fbb2db..283acd4e2 100644 --- a/website/content.en/ChapterTwo/String.md +++ b/website/content.en/ChapterTwo/String.md @@ -189,4 +189,3 @@ weight: 2 |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.4%| |2167|Minimum Time to Remove All Cars Containing Illegal Goods|[Go]({{< relref "/ChapterFour/2100~2199/2167.Minimum-Time-to-Remove-All-Cars-Containing-Illegal-Goods.md" >}})|Hard||||40.7%| |2182|Construct String With Repeat Limit|[Go]({{< relref "/ChapterFour/2100~2199/2182.Construct-String-With-Repeat-Limit.md" >}})|Medium||||52.2%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Tree.md b/website/content.en/ChapterTwo/Tree.md index 6d35c9bf0..f2748f07d 100644 --- a/website/content.en/ChapterTwo/Tree.md +++ b/website/content.en/ChapterTwo/Tree.md @@ -93,4 +93,3 @@ weight: 6 |1600|Throne Inheritance|[Go]({{< relref "/ChapterFour/1600~1699/1600.Throne-Inheritance.md" >}})|Medium||||63.6%| |1609|Even Odd Tree|[Go]({{< relref "/ChapterFour/1600~1699/1609.Even-Odd-Tree.md" >}})|Medium||||54.3%| |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.4%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Two_Pointers.md b/website/content.en/ChapterTwo/Two_Pointers.md index 305c06a25..1cb07731c 100644 --- a/website/content.en/ChapterTwo/Two_Pointers.md +++ b/website/content.en/ChapterTwo/Two_Pointers.md @@ -108,4 +108,3 @@ weight: 3 |1679|Max Number of K-Sum Pairs|[Go]({{< relref "/ChapterFour/1600~1699/1679.Max-Number-of-K-Sum-Pairs.md" >}})|Medium||||57.3%| |1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||67.2%| |1877|Minimize Maximum Pair Sum in Array|[Go]({{< relref "/ChapterFour/1800~1899/1877.Minimize-Maximum-Pair-Sum-in-Array.md" >}})|Medium||||79.9%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content.en/ChapterTwo/Union_Find.md b/website/content.en/ChapterTwo/Union_Find.md index aecba8dc8..1e0404291 100644 --- a/website/content.en/ChapterTwo/Union_Find.md +++ b/website/content.en/ChapterTwo/Union_Find.md @@ -45,4 +45,3 @@ weight: 16 |1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||62.1%| |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||||53.2%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md b/website/content/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md index 4f1a96b8e..5164e7c17 100644 --- a/website/content/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md +++ b/website/content/ChapterFour/2000~2099/2038.Remove-Colored-Pieces-if-Both-Neighbors-are-the-Same-Color.md @@ -91,10 +91,10 @@ func winnerOfGame(colors string) bool { Acont = 0 } if Acont >= 3 { - As += Acont - 2 + As++ } if Bcont >= 3 { - Bs += Bcont - 2 + Bs++ } } if As > Bs { diff --git a/website/content/ChapterOne/Algorithm.md b/website/content/ChapterOne/Algorithm.md index 1b4ddfc7c..88e22bc72 100644 --- a/website/content/ChapterOne/Algorithm.md +++ b/website/content/ChapterOne/Algorithm.md @@ -24,4 +24,3 @@ weight: 2 |几何||1. 凸包 - Gift wrapping
2. 凸包 - Graham scan
3. 线段问题
4. 多边形和多面体相关问题
|| |NP 完全|1. 计算模型
2. P 类与 NP 类问题
3. NP 完全问题
4. NP 完全问题的近似算法
|1. 随机存取机 RAM
2. 随机存取存储程序机 RASP
3. 图灵机
4. 非确定性图灵机
5. P 类与 NP 类语言
6. 多项式时间验证
7. 多项式时间变换
8. Cook定理
9. 合取范式的可满足性问题 CNF-SAT
10. 3 元合取范式的可满足性问题 3-SAT
11. 团问题 CLIQUE
12. 顶点覆盖问题 VERTEX-COVER
13. 子集和问题 SUBSET-SUM
14. 哈密顿回路问题 HAM-CYCLE
15. 旅行售货员问题 TSP
16. 顶点覆盖问题的近似算法
17. 旅行售货员问题近似算法
18. 具有三角不等式性质的旅行售货员问题
19. 一般的旅行售货员问题
20. 集合覆盖问题的近似算法
21. 子集和问题的近似算法
22. 子集和问题的指数时间算法
23. 子集和问题的多项式时间近似格式
|| |位运算| 位操作包括:
1. 取反(NOT)
2. 按位或(OR)
3. 按位异或(XOR)
4. 按位与(AND)
5. 移位: 是一个二元运算符,用来将一个二进制数中的每一位全部都向一个方向移动指定位,溢出的部分将被舍弃,而空缺的部分填入一定的值。
| 1.数字范围按位与
2.UTF-8 编码验证
3.数字转换为十六进制数
4.找出最长的超赞子字符串
5.数组异或操作
6.幂集
7.位1的个数
8.二进制表示中质数个计算置位
9.子数组异或查询
| [力扣:位运算](https://leetcode-cn.com/tag/bit-manipulation/)| -|------------|------------------------------------------------------------------|-----------------------------------------------------------------|--------------------| diff --git a/website/content/ChapterOne/Data_Structure.md b/website/content/ChapterOne/Data_Structure.md index 0ab68d66e..aeb040062 100644 --- a/website/content/ChapterOne/Data_Structure.md +++ b/website/content/ChapterOne/Data_Structure.md @@ -22,4 +22,3 @@ weight: 1 |数组实现的堆
Heap|1. 极大堆和极小堆 Max Heap and Min Heap
2. 极大极小堆
3. 双端堆 Deap
4. d 叉堆||| |树实现的堆
Heap|1. 左堆 Leftist Tree/Leftist Heap
2. 扁堆
3. 二项式堆
4. 斐波那契堆 Fibonacco Heap
5. 配对堆 Pairing Heap||| |查找
Search|1. 哈希表 Hash
2. 跳跃表 Skip List
3. 排序二叉树 Binary Sort Tree
4. AVL 树
5. B 树 / B+ 树 / B* 树
6. AA 树
7. 红黑树 Red Black Tree
8. 排序二叉堆 Binary Heap
9. Splay 树
10. 双链树 Double Chained Tree
11. Trie 树
12. R 树||| -|--------------------------------------------|--------------------------------------------------------------------------------------------|---------------------------|-----------------------------------| diff --git a/website/content/ChapterOne/Time_Complexity.md b/website/content/ChapterOne/Time_Complexity.md index f98a04263..96ba609ca 100644 --- a/website/content/ChapterOne/Time_Complexity.md +++ b/website/content/ChapterOne/Time_Complexity.md @@ -27,7 +27,6 @@ weight: 3 |8|10^9|O(sqrt(n))|筛素数、求平方根| |9|10^10|O(log n)|二分搜索| |10|+∞|O(1)|数学相关算法| -|------------------------------|------------------------------|------------------------------------------------------------------|------------------------------------------------------------------| 一些具有迷惑性的例子: diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index 18d03f0d5..fd920bc58 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -424,4 +424,3 @@ weight: 1 |2170|Minimum Operations to Make the Array Alternating|[Go]({{< relref "/ChapterFour/2100~2199/2170.Minimum-Operations-to-Make-the-Array-Alternating.md" >}})|Medium||||33.2%| |2171|Removing Minimum Number of Magic Beans|[Go]({{< relref "/ChapterFour/2100~2199/2171.Removing-Minimum-Number-of-Magic-Beans.md" >}})|Medium||||42.1%| |2183|Count Array Pairs Divisible by K|[Go]({{< relref "/ChapterFour/2100~2199/2183.Count-Array-Pairs-Divisible-by-K.md" >}})|Hard||||28.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Backtracking.md b/website/content/ChapterTwo/Backtracking.md index 696602ea1..cbc3b8b08 100644 --- a/website/content/ChapterTwo/Backtracking.md +++ b/website/content/ChapterTwo/Backtracking.md @@ -139,4 +139,3 @@ func updateMatrix_BFS(matrix [][]int) [][]int { |1079|Letter Tile Possibilities|[Go]({{< relref "/ChapterFour/1000~1099/1079.Letter-Tile-Possibilities.md" >}})|Medium| O(n^2)| O(1)|❤️|76.0%| |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||||52.2%| |1655|Distribute Repeating Integers|[Go]({{< relref "/ChapterFour/1600~1699/1655.Distribute-Repeating-Integers.md" >}})|Hard||||39.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Binary_Indexed_Tree.md b/website/content/ChapterTwo/Binary_Indexed_Tree.md index dcc02111a..ae1c0c3f1 100644 --- a/website/content/ChapterTwo/Binary_Indexed_Tree.md +++ b/website/content/ChapterTwo/Binary_Indexed_Tree.md @@ -17,4 +17,3 @@ weight: 19 |0493|Reverse Pairs|[Go]({{< relref "/ChapterFour/0400~0499/0493.Reverse-Pairs.md" >}})|Hard||||30.9%| |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard||||41.8%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Binary_Search.md b/website/content/ChapterTwo/Binary_Search.md index 333ea6970..0bbb5a462 100644 --- a/website/content/ChapterTwo/Binary_Search.md +++ b/website/content/ChapterTwo/Binary_Search.md @@ -215,4 +215,3 @@ func peakIndexInMountainArray(A []int) int { |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| |1658|Minimum Operations to Reduce X to Zero|[Go]({{< relref "/ChapterFour/1600~1699/1658.Minimum-Operations-to-Reduce-X-to-Zero.md" >}})|Medium||||37.6%| |1818|Minimum Absolute Sum Difference|[Go]({{< relref "/ChapterFour/1800~1899/1818.Minimum-Absolute-Sum-Difference.md" >}})|Medium||||30.4%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Bit_Manipulation.md b/website/content/ChapterTwo/Bit_Manipulation.md index 81757d090..c55c4b8fa 100644 --- a/website/content/ChapterTwo/Bit_Manipulation.md +++ b/website/content/ChapterTwo/Bit_Manipulation.md @@ -103,4 +103,3 @@ X & ~X = 0 |1734|Decode XORed Permutation|[Go]({{< relref "/ChapterFour/1700~1799/1734.Decode-XORed-Permutation.md" >}})|Medium||||63.0%| |1738|Find Kth Largest XOR Coordinate Value|[Go]({{< relref "/ChapterFour/1700~1799/1738.Find-Kth-Largest-XOR-Coordinate-Value.md" >}})|Medium||||61.0%| |1763|Longest Nice Substring|[Go]({{< relref "/ChapterFour/1700~1799/1763.Longest-Nice-Substring.md" >}})|Easy||||61.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Breadth_First_Search.md b/website/content/ChapterTwo/Breadth_First_Search.md index bb2c827f8..6deaa4ce1 100644 --- a/website/content/ChapterTwo/Breadth_First_Search.md +++ b/website/content/ChapterTwo/Breadth_First_Search.md @@ -89,4 +89,3 @@ weight: 10 |1609|Even Odd Tree|[Go]({{< relref "/ChapterFour/1600~1699/1609.Even-Odd-Tree.md" >}})|Medium||||54.4%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| |1654|Minimum Jumps to Reach Home|[Go]({{< relref "/ChapterFour/1600~1699/1654.Minimum-Jumps-to-Reach-Home.md" >}})|Medium||||29.1%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Depth_First_Search.md b/website/content/ChapterTwo/Depth_First_Search.md index b25af6c74..0cd1fb535 100644 --- a/website/content/ChapterTwo/Depth_First_Search.md +++ b/website/content/ChapterTwo/Depth_First_Search.md @@ -116,4 +116,3 @@ weight: 9 |1600|Throne Inheritance|[Go]({{< relref "/ChapterFour/1600~1699/1600.Throne-Inheritance.md" >}})|Medium||||63.6%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Dynamic_Programming.md b/website/content/ChapterTwo/Dynamic_Programming.md index 605d6cdec..8df280c7f 100644 --- a/website/content/ChapterTwo/Dynamic_Programming.md +++ b/website/content/ChapterTwo/Dynamic_Programming.md @@ -107,4 +107,3 @@ weight: 7 |1691|Maximum Height by Stacking Cuboids|[Go]({{< relref "/ChapterFour/1600~1699/1691.Maximum-Height-by-Stacking-Cuboids.md" >}})|Hard||||54.6%| |1696|Jump Game VI|[Go]({{< relref "/ChapterFour/1600~1699/1696.Jump-Game-VI.md" >}})|Medium||||46.1%| |2167|Minimum Time to Remove All Cars Containing Illegal Goods|[Go]({{< relref "/ChapterFour/2100~2199/2167.Minimum-Time-to-Remove-All-Cars-Containing-Illegal-Goods.md" >}})|Hard||||40.8%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Hash_Table.md b/website/content/ChapterTwo/Hash_Table.md index f47100b61..c3378fe48 100644 --- a/website/content/ChapterTwo/Hash_Table.md +++ b/website/content/ChapterTwo/Hash_Table.md @@ -170,4 +170,3 @@ weight: 13 |2043|Simple Bank System|[Go]({{< relref "/ChapterFour/2000~2099/2043.Simple-Bank-System.md" >}})|Medium||||65.2%| |2166|Design Bitset|[Go]({{< relref "/ChapterFour/2100~2199/2166.Design-Bitset.md" >}})|Medium||||31.8%| |2170|Minimum Operations to Make the Array Alternating|[Go]({{< relref "/ChapterFour/2100~2199/2170.Minimum-Operations-to-Make-the-Array-Alternating.md" >}})|Medium||||33.2%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Linked_List.md b/website/content/ChapterTwo/Linked_List.md index 95bed400c..addf28c45 100644 --- a/website/content/ChapterTwo/Linked_List.md +++ b/website/content/ChapterTwo/Linked_List.md @@ -67,4 +67,3 @@ weight: 4 |1670|Design Front Middle Back Queue|[Go]({{< relref "/ChapterFour/1600~1699/1670.Design-Front-Middle-Back-Queue.md" >}})|Medium||||57.2%| |1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||67.1%| |2181|Merge Nodes in Between Zeros|[Go]({{< relref "/ChapterFour/2100~2199/2181.Merge-Nodes-in-Between-Zeros.md" >}})|Medium||||86.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Math.md b/website/content/ChapterTwo/Math.md index 3283d49fe..3269ec17a 100644 --- a/website/content/ChapterTwo/Math.md +++ b/website/content/ChapterTwo/Math.md @@ -150,4 +150,3 @@ weight: 12 |2169|Count Operations to Obtain Zero|[Go]({{< relref "/ChapterFour/2100~2199/2169.Count-Operations-to-Obtain-Zero.md" >}})|Easy||||75.2%| |2180|Count Integers With Even Digit Sum|[Go]({{< relref "/ChapterFour/2100~2199/2180.Count-Integers-With-Even-Digit-Sum.md" >}})|Easy||||65.5%| |2183|Count Array Pairs Divisible by K|[Go]({{< relref "/ChapterFour/2100~2199/2183.Count-Array-Pairs-Divisible-by-K.md" >}})|Hard||||28.3%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Segment_Tree.md b/website/content/ChapterTwo/Segment_Tree.md index ee504071d..eafc8181e 100644 --- a/website/content/ChapterTwo/Segment_Tree.md +++ b/website/content/ChapterTwo/Segment_Tree.md @@ -49,4 +49,3 @@ weight: 18 |0850|Rectangle Area II|[Go]({{< relref "/ChapterFour/0800~0899/0850.Rectangle-Area-II.md" >}})|Hard| O(n log n)| O(n)|❤️|53.9%| |1157|Online Majority Element In Subarray|[Go]({{< relref "/ChapterFour/1100~1199/1157.Online-Majority-Element-In-Subarray.md" >}})|Hard| O(log n)| O(n)|❤️|41.8%| |1649|Create Sorted Array through Instructions|[Go]({{< relref "/ChapterFour/1600~1699/1649.Create-Sorted-Array-through-Instructions.md" >}})|Hard||||37.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Sliding_Window.md b/website/content/ChapterTwo/Sliding_Window.md index 6064849cd..7b771de5a 100644 --- a/website/content/ChapterTwo/Sliding_Window.md +++ b/website/content/ChapterTwo/Sliding_Window.md @@ -64,4 +64,3 @@ weight: 17 |1696|Jump Game VI|[Go]({{< relref "/ChapterFour/1600~1699/1696.Jump-Game-VI.md" >}})|Medium||||46.1%| |1763|Longest Nice Substring|[Go]({{< relref "/ChapterFour/1700~1799/1763.Longest-Nice-Substring.md" >}})|Easy||||61.5%| |1984|Minimum Difference Between Highest and Lowest of K Scores|[Go]({{< relref "/ChapterFour/1900~1999/1984.Minimum-Difference-Between-Highest-and-Lowest-of-K-Scores.md" >}})|Easy||||54.5%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Sorting.md b/website/content/ChapterTwo/Sorting.md index 265c06486..a9d10027f 100755 --- a/website/content/ChapterTwo/Sorting.md +++ b/website/content/ChapterTwo/Sorting.md @@ -126,4 +126,3 @@ weight: 14 |2164|Sort Even and Odd Indices Independently|[Go]({{< relref "/ChapterFour/2100~2199/2164.Sort-Even-and-Odd-Indices-Independently.md" >}})|Easy||||65.0%| |2165|Smallest Value of the Rearranged Number|[Go]({{< relref "/ChapterFour/2100~2199/2165.Smallest-Value-of-the-Rearranged-Number.md" >}})|Medium||||51.4%| |2171|Removing Minimum Number of Magic Beans|[Go]({{< relref "/ChapterFour/2100~2199/2171.Removing-Minimum-Number-of-Magic-Beans.md" >}})|Medium||||42.1%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Stack.md b/website/content/ChapterTwo/Stack.md index da86ef258..b75babb3d 100644 --- a/website/content/ChapterTwo/Stack.md +++ b/website/content/ChapterTwo/Stack.md @@ -74,4 +74,3 @@ weight: 5 |1653|Minimum Deletions to Make String Balanced|[Go]({{< relref "/ChapterFour/1600~1699/1653.Minimum-Deletions-to-Make-String-Balanced.md" >}})|Medium||||58.9%| |1673|Find the Most Competitive Subsequence|[Go]({{< relref "/ChapterFour/1600~1699/1673.Find-the-Most-Competitive-Subsequence.md" >}})|Medium||||49.3%| |1700|Number of Students Unable to Eat Lunch|[Go]({{< relref "/ChapterFour/1700~1799/1700.Number-of-Students-Unable-to-Eat-Lunch.md" >}})|Easy||||68.7%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/String.md b/website/content/ChapterTwo/String.md index 650fbb2db..283acd4e2 100644 --- a/website/content/ChapterTwo/String.md +++ b/website/content/ChapterTwo/String.md @@ -189,4 +189,3 @@ weight: 2 |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.4%| |2167|Minimum Time to Remove All Cars Containing Illegal Goods|[Go]({{< relref "/ChapterFour/2100~2199/2167.Minimum-Time-to-Remove-All-Cars-Containing-Illegal-Goods.md" >}})|Hard||||40.7%| |2182|Construct String With Repeat Limit|[Go]({{< relref "/ChapterFour/2100~2199/2182.Construct-String-With-Repeat-Limit.md" >}})|Medium||||52.2%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Tree.md b/website/content/ChapterTwo/Tree.md index 6d35c9bf0..f2748f07d 100644 --- a/website/content/ChapterTwo/Tree.md +++ b/website/content/ChapterTwo/Tree.md @@ -93,4 +93,3 @@ weight: 6 |1600|Throne Inheritance|[Go]({{< relref "/ChapterFour/1600~1699/1600.Throne-Inheritance.md" >}})|Medium||||63.6%| |1609|Even Odd Tree|[Go]({{< relref "/ChapterFour/1600~1699/1609.Even-Odd-Tree.md" >}})|Medium||||54.3%| |2096|Step-By-Step Directions From a Binary Tree Node to Another|[Go]({{< relref "/ChapterFour/2000~2099/2096.Step-By-Step-Directions-From-a-Binary-Tree-Node-to-Another.md" >}})|Medium||||48.4%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Two_Pointers.md b/website/content/ChapterTwo/Two_Pointers.md index 01bf032f7..d20573432 100644 --- a/website/content/ChapterTwo/Two_Pointers.md +++ b/website/content/ChapterTwo/Two_Pointers.md @@ -108,4 +108,3 @@ weight: 3 |1679|Max Number of K-Sum Pairs|[Go]({{< relref "/ChapterFour/1600~1699/1679.Max-Number-of-K-Sum-Pairs.md" >}})|Medium||||57.3%| |1721|Swapping Nodes in a Linked List|[Go]({{< relref "/ChapterFour/1700~1799/1721.Swapping-Nodes-in-a-Linked-List.md" >}})|Medium||||67.2%| |1877|Minimize Maximum Pair Sum in Array|[Go]({{< relref "/ChapterFour/1800~1899/1877.Minimize-Maximum-Pair-Sum-in-Array.md" >}})|Medium||||79.9%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------| diff --git a/website/content/ChapterTwo/Union_Find.md b/website/content/ChapterTwo/Union_Find.md index 280912ef8..7cc427108 100644 --- a/website/content/ChapterTwo/Union_Find.md +++ b/website/content/ChapterTwo/Union_Find.md @@ -45,4 +45,3 @@ weight: 16 |1319|Number of Operations to Make Network Connected|[Go]({{< relref "/ChapterFour/1300~1399/1319.Number-of-Operations-to-Make-Network-Connected.md" >}})|Medium||||62.1%| |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||||53.2%| |1631|Path With Minimum Effort|[Go]({{< relref "/ChapterFour/1600~1699/1631.Path-With-Minimum-Effort.md" >}})|Medium||||55.7%| -|------------|-------------------------------------------------------|-------| ----------------| ---------------|-------------|-------------|-------------|