Data Structures
---Learn with WilliamFiset---
---仅作为个人学习笔记---
---课程链接:https://www.youtube.com/watch?v=Qmt0QwzEmh0&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu ---
Abstract Data Types
ADT only defines how a DS should behave and what methods it should have
but not the details surrounding how those methods are implemented.
抽象数据类型仅定义数据结构如何工作和必要的方法,而不考虑具体实现。
Introduction to Big-O Notation
Complexity Analysis
复杂度分析包括两个方面:Time and Space
复杂度的简化:
例子:
二分查找:
每次抛一半的数,最坏情况抛x次后只剩1个数即 n/(2^x)=1,x=log2(n),因此复杂度为O(log(n))