Skip to content

Commit

Permalink
Merge pull request #47 from halfrost/add_hugo
Browse files Browse the repository at this point in the history
 generate PDF version
  • Loading branch information
halfrost authored Aug 16, 2020
2 parents d4c623c + 5e4cbbe commit 2e88f5c
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 6 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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》 <a href="https://books.halfrost.com/leetcode/cookbook.pdf" rel="nofollow">Download here</a>
</p>

<p align='center'>
<img src="https://img.halfrost.com/Leetcode/Cookbook.png">
</p>

## Data Structures

> 标识了 ✅ 的专题是完成所有题目了的,没有标识的是还没有做完所有题目的
Expand Down
2 changes: 1 addition & 1 deletion leetcode/0717.1-bit-and-2-bit-Characters/README.md
Original file line number Diff line number Diff line change
@@ -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`).

Expand Down
2 changes: 1 addition & 1 deletion leetcode/0933.Number-of-Recent-Calls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



### 题目
## 题目

Write a class `RecentCounter` to count recent requests.

Expand Down
Original file line number Diff line number Diff line change
@@ -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`).

Expand Down
2 changes: 1 addition & 1 deletion website/content/ChapterFour/0933.Number-of-Recent-Calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



### 题目
## 题目

Write a class `RecentCounter` to count recent requests.

Expand Down
24 changes: 24 additions & 0 deletions website/content/ChapterFour/pytool/GenerateOne.py
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion website/content/ChapterOne/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次

- 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。
- 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。
-
- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。

## 互动与勘误

Expand Down
2 changes: 1 addition & 1 deletion website/content/ChapterTwo/Array.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Array
type: docs
---

## Array
# Array

| Title | Solution | Difficulty | Time | Space |收藏|
| ----- | :--------: | :----------: | :----: | :-----: | :-----: |
Expand Down
1 change: 1 addition & 0 deletions website/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ LeetCode 统计代码运行时长会有波动的,相同的代码提交 10 次

- 本电子书的左上角有搜索栏,可以迅速帮你找到你想看的章节和题号。
- 本电子书每页都接入了 Gitalk,每一页的最下方都有评论框可以评论,如果没有显示出来,请检查自己的网络。
- 关于题解,笔者建议这样使用:先自己读题,思考如何解题。如果 15 分钟还没有思路,那么先看笔者的解题思路,但是不要看代码。有思路以后自己用代码实现一遍。如果完全不会写,那就看笔者提供的代码,找出自己到底哪里不会写,找出问题记下来,这就是自己要弥补的知识漏洞。如果自己实现出来了,提交以后有错误,自己先 debug。AC 以后没有到 100% 也先自己思考如何优化。如果每道题自己都能优化到 100% 了,那么一段时间以后进步会很大。所以总的来说,实在没思路,看解题思路;实在优化不到 100%,看看代码。

## 互动与勘误

Expand Down

0 comments on commit 2e88f5c

Please sign in to comment.