We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb7022e commit b8f0420Copy full SHA for b8f0420
docs/19_python内置常用算法和数据结构/builtins.md
@@ -8,3 +8,16 @@
8
- collections
9
- heapq
10
- bisect
11
+
12
+下边我列了一个常用的表格,如果有遗漏可以在 issue 中提出。确保你了解这些数据结构和算法的使用以及时间、空间复杂度。
13
14
+| 数据结构/算法 | 语言内置 | 内置库 |
15
+|----------------|---------------------------------|---------------------------------------------------------------|
16
+| 线性结构 | list(列表)/tuple(元祖) | array(数组,不常用)/collections.namedtuple |
17
+| 链式结构 | | collections.deque(双端队列) |
18
+| 字典结构 | dict(字典) | collections.Counter(计数器)/OrderedDict(有序字典)/defaultdict |
19
+| 集合结构 | set(集合)/frozenset(不可变集合) | |
20
+| 排序算法 | sorted | |
21
+| 二分算法 | | bisect模块 |
22
+| 堆算法 | | heapq模块 |
23
+| 缓存算法 | | functools.lru_cache(Least Recent Used, python3) |
0 commit comments