Session Overview
This lecture discusses how indirection is used to provide an efficient implementation of Python lists and other data structures. It also presents and analyzes the efficiency of selection and merge sort. |
Session Activities
Lecture Videos
- Lecture 9: Memory and Search Methods (00:48:08)
About this Video
Topics covered: Memory, storage, indirection, sorting.
Resources
Check Yourself
What is indirection (in computing)?
› View/hide answer
Indirection is the ability to access something using a name or reference instead of the value itself.
We know that a linear search works on all lists and is O(len(L)). Can we sort a list in sub-linear time?
› View/hide answer
No, because we can't sort a list without looking at each element at least once.
Can we even do it in linear time?
› View/hide answer
The answer is probably, no. But we can do it in O(n log n), where n is the length of the list.
Further Study
These optional resources are provided for students that wish to explore this topic more fully.
Readings
- 8.7. Sets—Unordered collections of unique elements. Python Standard Library.
Related Lectures
- 6.01SC Introduction to Electrical Engineering and Computer Science I.
-
6.006 Introduction to Algorithms. 6.006 lectures assume a greater level of mathematical sophistication than does 6.00SC. Read the lecture notes on:
- Binary search trees
- Sorting
- Searching