diff --git a/README.md b/README.md index f0b89ba1b..549aa5c25 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,15 @@ 支持 Progressive Web Apps 的题解电子书《LeetCode Cookbook》 Online Reading

+ +

+离线版本的电子书《LeetCode Cookbook》 Download here +

+ +

+ +

+ ## Data Structures > 标识了 ✅ 的专题是完成所有题目了的,没有标识的是还没有做完所有题目的 diff --git a/leetcode/0717.1-bit-and-2-bit-Characters/README.md b/leetcode/0717.1-bit-and-2-bit-Characters/README.md index 2573acaca..877c36582 100755 --- a/leetcode/0717.1-bit-and-2-bit-Characters/README.md +++ b/leetcode/0717.1-bit-and-2-bit-Characters/README.md @@ -1,7 +1,7 @@ # [717. 1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/) -# 题目: +## 题目: We have two special characters. The first character can be represented by one bit `0`. The second character can be represented by two bits (`10` or `11`). diff --git a/leetcode/0933.Number-of-Recent-Calls/README.md b/leetcode/0933.Number-of-Recent-Calls/README.md index f4eebfaff..02b2340ce 100644 --- a/leetcode/0933.Number-of-Recent-Calls/README.md +++ b/leetcode/0933.Number-of-Recent-Calls/README.md @@ -2,7 +2,7 @@ -### 题目 +## 题目 Write a class `RecentCounter` to count recent requests. diff --git a/website/content/ChapterFour/0717.1-bit-and-2-bit-Characters.md b/website/content/ChapterFour/0717.1-bit-and-2-bit-Characters.md index 923e5679d..499889244 100755 --- a/website/content/ChapterFour/0717.1-bit-and-2-bit-Characters.md +++ b/website/content/ChapterFour/0717.1-bit-and-2-bit-Characters.md @@ -1,7 +1,7 @@ # [717. 1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/) -# 题目: +## 题目: We have two special characters. The first character can be represented by one bit `0`. The second character can be represented by two bits (`10` or `11`). diff --git a/website/content/ChapterFour/0933.Number-of-Recent-Calls.md b/website/content/ChapterFour/0933.Number-of-Recent-Calls.md index f4eebfaff..02b2340ce 100644 --- a/website/content/ChapterFour/0933.Number-of-Recent-Calls.md +++ b/website/content/ChapterFour/0933.Number-of-Recent-Calls.md @@ -2,7 +2,7 @@ -### 题目 +## 题目 Write a class `RecentCounter` to count recent requests. diff --git a/website/content/ChapterFour/pytool/GenerateOne.py b/website/content/ChapterFour/pytool/GenerateOne.py new file mode 100644 index 000000000..233171b52 --- /dev/null +++ b/website/content/ChapterFour/pytool/GenerateOne.py @@ -0,0 +1,24 @@ +import os +from os.path import join +from shutil import move +import glob + +content = [] +oneFile = 'ChapterTwo_OnePDF.md' +current_working_dir = os.getcwd() +# print(f"current_working_dir: {current_working_dir}") + +dir_names = glob.glob("*.md") +dir_names.sort() +# print(dir_names) +print(len(dir_names)) +for file_name in dir_names: + # print(file_name) + with open(file_name, "r") as myfile: + content = myfile.read() + with open(oneFile, "a") as myfile: + myfile.write("\n") + myfile.write(content) + myfile.write("\n") + +print("Finished") \ No newline at end of file diff --git a/website/content/ChapterOne/_index.md b/website/content/ChapterOne/_index.md index e0c1e697d..0aaf6fceb 100644 --- a/website/content/ChapterOne/_index.md +++ b/website/content/ChapterOne/_index.md @@ -71,7 +71,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次 - 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。 - 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。 -- +- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。 ## 互动与勘误 diff --git a/website/content/ChapterTwo/Array.md b/website/content/ChapterTwo/Array.md index da5c58b59..59dfa8f18 100644 --- a/website/content/ChapterTwo/Array.md +++ b/website/content/ChapterTwo/Array.md @@ -3,7 +3,7 @@ title: Array type: docs --- -## Array +# Array | Title | Solution | Difficulty | Time | Space |收藏| | ----- | :--------: | :----------: | :----: | :-----: | :-----: | diff --git a/website/content/_index.md b/website/content/_index.md index 9daa10df6..d2b76d4ef 100644 --- a/website/content/_index.md +++ b/website/content/_index.md @@ -70,6 +70,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次 - 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。 - 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。 +- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。 ## 互动与勘误