When designing a program's data, we have three steps:
Step 1: come up with an Interface or Abstract Data Type (ADT) for the data. An ADT is written in English and perhaps uses mathematical notation to describe the semantics (meaning) of the operations that must be performed on the data. I talked about the Queues, Lists, USets, and Sets from Section 1.2. These kind of ADTs are general ADTs intended for broad use, but during program design we might also come up with domain specific ADTs. For example, if we are writing a music player, we need an ADT for the library of songs. Perhaps the ADT builds on the List ADT, but has operations for finding all songs by a particular author and so on.
Step 3: actually implement the ADT in the programming language for our project.
I started talking about Step 2 for the Stack ADT, although we will have to finish it next time.
Exercise 1..1 For now, just describe in pseudocode how you would solve each of these problems. We will come back to this exercise in future lectures, where I will ask you to estimate speed and eventually implement using C++. But for now, just figure out if you would use a Stack, Queue, List, USet, SSet, and briefly describe how you would do so.
Exercise 1..2 on Dyck words. Describe using pseudocode how you can verify if a string is a Dyck word using a stack.