Skip to content

Commit 840697a

Browse files
committed
style: format code and documents
1 parent debc8de commit 840697a

File tree

30 files changed

+43
-45
lines changed

30 files changed

+43
-45
lines changed

lcof/面试题09. 用两个栈实现队列/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ public class CQueue {
299299
stack1 = new Stack<int>();
300300
stack2 = new Stack<int>();
301301
}
302-
302+
303303
public void AppendTail(int value) {
304304
stack1.Push(value);
305305
}
306-
306+
307307
public int DeleteHead() {
308308
if (stack2.Count == 0) {
309309
while (stack1.Count != 0) {
@@ -327,4 +327,5 @@ public class CQueue {
327327
```
328328
329329
```
330+
330331
<!-- tabs:end -->

lcof/面试题11. 旋转数组的最小数字/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,5 @@ public class Solution {
175175
```
176176
177177
```
178+
178179
<!-- tabs:end -->

lcof/面试题12. 矩阵中的路径/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public class Solution {
298298
{
299299
if (dfs(board, word, i, j, k)) {
300300
return true;
301-
}
301+
}
302302
}
303303
}
304304
return false;

lcof/面试题19. 正则表达式匹配/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public class Solution {
237237
for(int j = 1; j < n + 1; j++) {
238238
if (p[j-1] == '*') {
239239
dp[0,j] = dp[0,j-2];
240-
}
240+
}
241241
}
242242
for (int i = 1; i < m + 1; i++) {
243243
for (int j = 1; j < n + 1; j++) {

lcof/面试题26. 树的子结构/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public class Solution {
289289
return false;
290290
}
291291
return dfs(A, B) || IsSubStructure(A.left, B) || IsSubStructure(A.right, B);
292-
}
292+
}
293293

294294
public bool dfs(TreeNode A, TreeNode B) {
295295
if (B == null) {

lcof/面试题28. 对称的二叉树/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public class Solution {
290290
if (left == null || right == null || left.val != right.val) {
291291
return false;
292292
}
293-
return dfs(left.left, right.right) && dfs(left.right, right.left);
293+
return dfs(left.left, right.right) && dfs(left.right, right.left);
294294
}
295295
}
296296
```

lcof/面试题29. 顺时针打印矩阵/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public class Solution {
197197
}
198198
for (int i = bottom; i >= top; i--) {
199199
ans.Add(matrix[i][left]);
200-
}
200+
}
201201
left += 1;
202202
if (left > right) {
203203
break;

lcof/面试题30. 包含min函数的栈/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,21 +283,21 @@ public class MinStack {
283283
minStack = new Stack<int>();
284284
minStack.Push(int.MaxValue);
285285
}
286-
286+
287287
public void Push(int x) {
288288
stack.Push(x);
289289
minStack.Push(Math.Min(minStack.Peek(), x));
290290
}
291-
291+
292292
public void Pop() {
293293
stack.Pop();
294294
minStack.Pop();
295295
}
296-
296+
297297
public int Top() {
298298
return stack.Peek();
299299
}
300-
300+
301301
public int Min() {
302302
return minStack.Peek();
303303
}

lcof/面试题33. 二叉搜索树的后序遍历序列/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl Solution {
225225
```
226226

227227
### **C#**
228+
228229
```cs
229230
public class Solution {
230231
public bool VerifyPostorder(int[] postorder) {

lcof/面试题37. 序列化二叉树/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,18 +323,18 @@ public class Codec {
323323
}
324324
return str;
325325
}
326-
326+
327327
public TreeNode rdeserialize(LinkedList<string> dataList) {
328328
if (dataList.First.Value.Equals("None")) {
329329
dataList.RemoveFirst();
330330
return null;
331331
}
332-
332+
333333
TreeNode root = new TreeNode(int.Parse(dataList.First.Value));
334334
dataList.RemoveFirst();
335335
root.left = rdeserialize(dataList);
336336
root.right = rdeserialize(dataList);
337-
337+
338338
return root;
339339
}
340340
}

0 commit comments

Comments
 (0)