Readings

The first set of assigned reading prior to Wednesday, February 1st is an review of simple data structures and of complexity analysis. Linked lists (two questions below), which we will revisit prior to spring break to prepare for covering graphs, should be a review of CS202 material; feel free to review those notes as needed. For our class, please read:

  1. Data Structures and Other Objects Using C++:

    • Chapter 1
    • Chapter 5.6

If you do not have the primary textbook, you can use the following free alternative text material instead:

  1. Open Data Structures

    • Chapter 1
    • Chapter 3

Questions (due 2/1, 5:00 pm)

Once you have completed the readings, answer the following questions:

  1. In the context of data structures, why would using a language with the Standard Template Library (STL) be advantageous?

  2. Suppose I wanted to implement a sequence container by using an linked list using a single pointer (e.g., front). What would be the complexity in terms of Big-O for the following operations:

    • Locate an element based on its value
    • Insert an element in the front
    • Insert an element in the back

  3. Describe one operation where a doubly linked list would have a better time complexity when compared to the same operation applied on a more "generic" singly linked list?

Submission

To submit your reading assignment, you must upload a text/PDF file onto Canvas prior to the deadline.