mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-04 16:12:47 +08:00
@ -29,6 +29,15 @@
|
||||
支持 Progressive Web Apps 的题解电子书《LeetCode Cookbook》 <a href="https://books.halfrost.com/leetcode/" rel="nofollow">Online Reading</a>
|
||||
</p>
|
||||
|
||||
|
||||
<p align='center'>
|
||||
离线版本的电子书《LeetCode Cookbook》PDF <a href="https://github.com/halfrost/LeetCode-Go/releases/" rel="nofollow">Download here</a>
|
||||
</p>
|
||||
|
||||
<p align='center'>
|
||||
<img src="https://img.halfrost.com/Leetcode/Cookbook.png">
|
||||
</p>
|
||||
|
||||
## Data Structures
|
||||
|
||||
> 标识了 ✅ 的专题是完成所有题目了的,没有标识的是还没有做完所有题目的
|
||||
|
@ -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`).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
### 题目
|
||||
## 题目
|
||||
|
||||
Write a class `RecentCounter` to count recent requests.
|
||||
|
||||
|
@ -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`).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
### 题目
|
||||
## 题目
|
||||
|
||||
Write a class `RecentCounter` to count recent requests.
|
||||
|
||||
|
24
website/content/ChapterFour/pytool/GenerateOne.py
Normal file
24
website/content/ChapterFour/pytool/GenerateOne.py
Normal file
@ -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")
|
@ -71,7 +71,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次
|
||||
|
||||
- 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。
|
||||
- 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。
|
||||
-
|
||||
- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。
|
||||
|
||||
## 互动与勘误
|
||||
|
||||
|
@ -3,7 +3,7 @@ title: Array
|
||||
type: docs
|
||||
---
|
||||
|
||||
## Array
|
||||
# Array
|
||||
|
||||
| Title | Solution | Difficulty | Time | Space |收藏|
|
||||
| ----- | :--------: | :----------: | :----: | :-----: | :-----: |
|
||||
|
@ -70,6 +70,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次
|
||||
|
||||
- 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。
|
||||
- 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。
|
||||
- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。
|
||||
|
||||
## 互动与勘误
|
||||
|
||||
|
Reference in New Issue
Block a user