数据结构/算法 | 语言内置 | 内置库 |
---|---|---|
线性结构 | list/tuple | arry/collections.namedtuple |
链式结构 | collections.deque(双端队列) | |
字典结构 | dict | collections. Counter/OrderedDict |
集合结构 | set/frozenset | |
排序算法 | sorted | |
二分算法 | bisect模块 | |
堆算法 | heapq模块 | |
缓存算法 | functools.lru_cache |
常见python内置数据结构算法
猜你喜欢
转载自blog.51cto.com/12080420/2389067
今日推荐
周排行