ch01-ADT and Big O

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.

抽象数据类型仅定义数据结构如何工作和必要的方法,而不考虑具体实现。

FC87B5BA642FF662A995847129AC24FA

Introduction to Big-O Notation

Complexity Analysis

复杂度分析包括两个方面:Time and Space

复杂度的简化:

C268291386AC095ACD0712C68ED918AC

例子:

399F25AABE4D31D4884ED83E8CA1B9C4

2D547364FCA44989F97E0ED9A2325A6D

二分查找:

C35E801D3FC8C1BF22A0FB02951A3BD8

每次抛一半的数,最坏情况抛x次后只剩1个数即 n/(2^x)=1,x=log2(n),因此复杂度为O(log(n))

004D7D9A4856B6C0922A5A210E405490

posted @ 2021-01-21 15:41  盐盐盐の锅  阅读(115)  评论(0编辑  收藏  举报