Skip to content

Commit e359efe

Browse files
committed
fix toc 中文无法索引
1 parent 1ba68f8 commit e359efe

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

Readme.md

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
22
**Table of Contents**
33

4-
- [Python面试题集](#python)
54
- [Python语言特性](#python)
65
- [1 Python的函数参数传递](#1-python)
76
- [2 Python中的元类(metaclass)](#2-pythonmetaclass)
@@ -98,34 +97,21 @@
9897
- [3 fromkeys()方法](#3-fromkeys)
9998
- [8 合并两个有序列表](#8-)
10099
- [9 交叉链表求交点](#9-)
101-
- [Definition for singly-linked list.](#definition-for-singly-linked-list)
102-
- [class ListNode:](#class-listnode)
103-
- [def __init__(self, x):](#def-initself-x)
104-
- [self.val = x](#selfval--x)
105-
- [self.next = None](#selfnext--none)
106100
- [10 二分查找](#10-)
107101
- [11 快排](#11-)
108102
- [12 找零问题](#12-)
109103
- [13 广度遍历和深度遍历二叉树](#13-)
110-
- [14 二叉树节点](#14-)
111-
- [15 层次遍历](#15-)
112-
- [16 深度遍历](#16-)
104+
- [14 二叉树节点](#14-)
105+
- [15 层次遍历](#15-)
106+
- [16 深度遍历](#16-)
113107
- [17 前中后序遍历](#17-)
114108
- [18 求最大树深](#18-)
115109
- [19 求两棵树是否相同](#19-)
116110
- [20 前序中序求后序](#20-)
117-
- [重建](#)
118-
- [后序遍历](#)
119111
- [21 单链表逆置](#21-)
120112

121113
<!-- markdown-toc end -->
122114

123-
# Python面试题集
124-
125-
目前面了4家python的公司,基本都是很基础的东西,对比发现和stackoverflow上高票数的问题有很多重复,整理一下希望对别人有帮助.
126-
127-
其中有可能是自己想到的一些知识点,也有一些是网上收集的.答案可能不太详尽,有需要还是自己搜一下吧.
128-
129115
# Python语言特性
130116

131117
## 1 Python的函数参数传递
@@ -905,7 +891,7 @@ Socket=Ip address+ TCP/UDP + port
905891
3. 文件断点续传
906892
3. 身份认证,状态管理,Cache缓存
907893

908-
## Ajax
894+
## 21 Ajax
909895

910896
# *NIX
911897

@@ -1124,11 +1110,10 @@ def loop_merge_sort(l1, l2):
11241110
去哪儿的面试,没做出来.
11251111

11261112
```python
1127-
# Definition for singly-linked list.
1128-
# class ListNode:
1129-
# def __init__(self, x):
1130-
# self.val = x
1131-
# self.next = None
1113+
class ListNode:
1114+
def __init__(self, x):
1115+
self.val = x
1116+
self.next = None
11321117
def node(l1, l2):
11331118
length1, lenth2 = 0, 0
11341119
# 求两个链表长度
@@ -1223,7 +1208,7 @@ if __name__ == '__main__':
12231208
给定一个数组,构建二叉树,并且按层次打印这个二叉树
12241209

12251210
```python
1226-
# 14 二叉树节点
1211+
## 14 二叉树节点
12271212
class Node(object):
12281213
def __init__(self, data, left=None, right=None):
12291214
self.data = data
@@ -1232,7 +1217,7 @@ class Node(object):
12321217

12331218
tree = Node(1, Node(3, Node(7, Node(0)), Node(6)), Node(2, Node(5), Node(4)))
12341219

1235-
# 15 层次遍历
1220+
## 15 层次遍历
12361221
def lookup(root):
12371222
stack = [root]
12381223
while stack:
@@ -1242,7 +1227,7 @@ def lookup(root):
12421227
stack.append(current.left)
12431228
if current.right:
12441229
stack.append(current.right)
1245-
# 16 深度遍历
1230+
## 16 深度遍历
12461231
def deep(root):
12471232
if not root:
12481233
return
@@ -1285,7 +1270,6 @@ def isSameTree(p, q):
12851270
推荐: http://blog.csdn.net/hinyunsin/article/details/6315502
12861271

12871272
```python
1288-
# 重建
12891273
def rebuild(pre, center):
12901274
if not pre:
12911275
return
@@ -1295,7 +1279,6 @@ def rebuild(pre, center):
12951279
cur.right = rebuild(pre[index + 1:], center[index + 1:])
12961280
return cur
12971281

1298-
# 后序遍历
12991282
def deep(root):
13001283
if not root:
13011284
return

0 commit comments

Comments
 (0)