Unit 1

Memory and Search Methods

« Previous | Next »

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

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

« Previous | Next »

Course Info

Learning Resource Types

theaters Lecture Videos
theaters Recitation Videos
assignment_turned_in Problem Sets with Solutions
grading Exams with Solutions
menu_book Online Textbook
assignment_turned_in Programming Assignments with Examples