leetcode伪代码-Data-Structures-and-Algorithms:数据结构和算法存储库

时间:2021-06-30 20:00:45
【文件属性】:
文件名称:leetcode伪代码-Data-Structures-and-Algorithms:数据结构和算法存储库
文件大小:134KB
文件格式:ZIP
更新时间:2021-06-30 20:00:45
系统开源 leetcode伪代码 第 1 课 - 介绍和效率 效率: 您使用计算机资源完成特定工作的效果如何。 无论是在时间上还是空间上。 以最少的资源完成最多的工作。 大 O 符号: O(n),其中 n 表示函数输入的长度。 O(1) = O(0n + 1) 考虑最好的、最坏的和平均情况(例如,对于一个字母表的迭代,平均情况是 13 次) 最后,重要的是“关系”:O(16n + 2) 或 O(29n + 2) 意味着 O(n)) 始终指定您的面试官您在谈论哪种情况(最佳,平均,最差) 算法通常分为以下性能等级: 恒定时间,例如 O(1) 对数,例如 O(log(n)) 线性,例如 O(n) 多项式,例如 O(n^2 + n) 指数,例如 O(2^n) 阶乘,例如 O(n!) 第 2 课 - 基于列表的集合 集合没有特定的顺序。 它们不需要具有相同类型的对象。 数组是Lists最常见的实现。 它在不同的编程语言中有所不同(有些允许不同类型的元素,有些不允许,等等) 一个数组是一个带有一些附加规则的列表:例如,每个数组都有一个称为“索引”的位置。 在最后插入它通常很容易(除非它有特定的大小)。 但
【文件预览】:
Data-Structures-and-Algorithms-master
----Lesson 6()
--------graph-traversal-practice.py(11KB)
--------graph-representation-practice.py(5KB)
----Lesson 3()
--------quick-sort-practice.py(930B)
--------recursion-practice.py(890B)
--------binary-search-practice.py(1KB)
----LICENSE(1KB)
----README.md(27KB)
----Lesson 2()
--------stack-practice.py(2KB)
--------queue-practice.py(754B)
--------linked-list-practice.py(3KB)
----Lesson 1()
--------classiness-practice.py(1KB)
--------lesson-1-quiz.py(1022B)
----Lesson 4()
--------hash-string-keys-practice.py(2KB)
--------python-dictionaries.py(2KB)
----Data+Structures+and+Algorithms+Syllabus.pdf(110KB)
----Lesson 5()
--------bst-practice.py(3KB)
--------binary-tree-practice.py(3KB)

网友评论