File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -2119,7 +2119,7 @@ Problems List in [there](https://books.halfrost.com/leetcode/ChapterTwo/Sliding_
2119
2119
2120
2120

2121
2121
2122
- - 线段数的经典数组实现写法 。将合并两个节点 pushUp 逻辑抽象出来了,可以实现任意操作(常见的操作有:加法,取 max,min 等等)。第 218 题,第 303 题,第 307 题,第 699 题。
2122
+ - 线段树的经典数组实现写法 。将合并两个节点 pushUp 逻辑抽象出来了,可以实现任意操作(常见的操作有:加法,取 max,min 等等)。第 218 题,第 303 题,第 307 题,第 699 题。
2123
2123
- 计数线段树的经典写法。第 315 题,第 327 题,第 493 题。
2124
2124
- 线段树的树的实现写法。第 715 题,第 732 题。
2125
2125
- 区间懒惰更新。第 218 题,第 699 题。
Original file line number Diff line number Diff line change
1
+ import os
2
+ import re
3
+ import glob
4
+
5
+ # file_name = 'Array.md'
6
+ reg = "## 题目大意"
7
+
8
+ current_working_dir = os .getcwd ()
9
+ # print(f"current_working_dir: {current_working_dir}")
10
+
11
+ dir_names = glob .glob ("*.md" )
12
+ dir_names .sort ()
13
+ print (len (dir_names ))
14
+
15
+ for file_name in dir_names :
16
+ # print(file_name)
17
+ with open (file_name , "r" ) as myfile :
18
+ codeContent = myfile .read ()
19
+ findIndex = codeContent .find (reg )
20
+ # print(findIndex)
21
+ content = codeContent [findIndex :]
22
+ with open (file_name , "w" ) as myfile :
23
+ myfile .write (content )
24
+ print ("Finished" )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ type: docs
7
7
8
8
![ ] ( https://img.halfrost.com/Leetcode/Segment_Tree.png )
9
9
10
- - 线段数的经典数组实现写法 。将合并两个节点 pushUp 逻辑抽象出来了,可以实现任意操作(常见的操作有:加法,取 max,min 等等)。第 218 题,第 303 题,第 307 题,第 699 题。
10
+ - 线段树的经典数组实现写法 。将合并两个节点 pushUp 逻辑抽象出来了,可以实现任意操作(常见的操作有:加法,取 max,min 等等)。第 218 题,第 303 题,第 307 题,第 699 题。
11
11
- 计数线段树的经典写法。第 315 题,第 327 题,第 493 题。
12
12
- 线段树的树的实现写法。第 715 题,第 732 题。
13
13
- 区间懒惰更新。第 218 题,第 699 题。
You can’t perform that action at this time.
0 commit comments