YouTube

Session 21 of Software Lessons, “Programming in C++: Data Structures Part 2,” runs about 20 minutes.

What this session covers

  • Introduction to data structures
  • Arrays, vectors and lists
  • Introduction to Big-O notation and P=NP

Key ideas

  • The choice of data structure determines how fast common operations are, such as reading by index, searching or inserting in the middle.
  • Big-O notation describes how the running time of an algorithm grows as the input size grows, ignoring constant factors.
  • Reading an array element by index takes constant time, while searching an unsorted list takes time proportional to its length.
  • P=NP asks whether every problem whose solution can be checked quickly can also be solved quickly, and it is an open question.