Skip to content

Commit 447a3b3

Browse files
committed
Structure ajustment
1 parent e11f997 commit 447a3b3

File tree

13 files changed

+69
-7
lines changed

13 files changed

+69
-7
lines changed

LANGS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* [Java](java)
22
* [C++](cpp)
3+
<!--
34
* [C#](cs)
45
* [Python](py)
56
* [Ruby](rb)
@@ -8,3 +9,4 @@
89
* [Scala](scala)
910
* [Go](go)
1011
* [Clojure](clj)
12+
-->

clj/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"clj": true
4+
}
5+
}

cpp/SUMMARY.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Summary
1+
# 算法精粹
22

33
* [介绍](README.md)
44
* [线性表](linear-list/README.md)
@@ -22,4 +22,3 @@
2222
* [贪心法](greedy/README.md)
2323
* [动态规划](dp/README.md)
2424
* [](graph/README.md)
25-

cpp/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"cpp": true
4+
}
5+
}

cpp/linear-list/array.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,24 @@ Your function should return length = 2, and `A` is now `[1,2]`.
2020

2121
### 代码1
2222

23-
{% codesnippet "./code/remove-duplicates-from-sorted-array-1.cpp", language="cpp" %}{% endcodesnippet %}
23+
24+
{% if book.cpp %}
25+
{% codesnippet "./code/remove-duplicates-from-sorted-array-1.cpp", language="cpp" %}{% endcodesnippet %}
26+
{% endif %}
2427

2528

2629
### 代码2
2730

28-
{% codesnippet "./code/remove-duplicates-from-sorted-array-2.cpp", language="cpp" %}{% endcodesnippet %}
31+
{% if book.cpp %}
32+
{% codesnippet "./code/remove-duplicates-from-sorted-array-2.cpp", language="cpp" %}{% endcodesnippet %}
33+
{% endif %}
2934

3035

3136
### 代码3
3237

33-
{% codesnippet "./code/remove-duplicates-from-sorted-array-3.cpp", language="cpp" %}{% endcodesnippet %}
38+
{% if book.cpp %}
39+
{% codesnippet "./code/remove-duplicates-from-sorted-array-3.cpp", language="cpp" %}{% endcodesnippet %}
40+
{% endif %}
3441

3542

3643
### 相关题目
@@ -54,14 +61,18 @@ For example, given sorted array `A = [1,1,1,2,2,3]`, your function should return
5461

5562
### 代码1
5663

57-
{% codesnippet "./code/remove-duplicates-from-sorted-array-ii-1.cpp", language="cpp" %}{% endcodesnippet %}
64+
{% if book.cpp %}
65+
{% codesnippet "./code/remove-duplicates-from-sorted-array-ii-1.cpp", language="cpp" %}{% endcodesnippet %}
66+
{% endif %}
5867

5968

6069
### 代码2
6170

6271
下面是一个更简洁的版本。上面的代码略长,不过扩展性好一些,例如将\fn{occur < 2}改为\fn{occur < 3},就变成了允许重复最多3次。
6372

64-
{% codesnippet "./code/remove-duplicates-from-sorted-array-ii-2.cpp", language="cpp" %}{% endcodesnippet %}
73+
{% if book.cpp %}
74+
{% codesnippet "./code/remove-duplicates-from-sorted-array-ii-2.cpp", language="cpp" %}{% endcodesnippet %}
75+
{% endif %}
6576

6677

6778
### 相关题目

cs/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"cs": true
4+
}
5+
}

go/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"go": true
4+
}
5+
}

java/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"java": true
4+
}
5+
}

js/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"js": true
4+
}
5+
}

py/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"py": true
4+
}
5+
}

rb/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"rb": true
4+
}
5+
}

scala/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"scala": true
4+
}
5+
}

swift/book.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variables": {
3+
"swift": true
4+
}
5+
}

0 commit comments

Comments
 (0)