CS 136: Elementary Algorithm Design and Data Abstraction, Spring 2020

Lecture Materials

Lecture Slides

Lecture material may be updated to fix any errors or minor changes in content (see errata)

These handouts are available in "1up" (one slide per page, suitable for viewing on a computer screen) and "3up" (three slides per page, plus room for notes, suitable for printing and bringing to class) versions. These handouts are also available in colour and (mostly) black & white.

Lecture slides will become available as the course progresses. See the calendar for more details.

Section 01: Introduction(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 02: Intro to C(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 03: Imperative C(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 04: The C Model(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 05: Pointers(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 06: Modularization(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 07: Arrays(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 08: Efficiency(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 09: Strings(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 10: Dynamic Memory & ADTs in C(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 11: Linked Data(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 12: Abstract Data Types(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)
Section 13: Beyond(1-up colour)(1-up b&w)(3-up colour)(3-up b&w)

Supplemental Material

As the term progresses, we may use additional videos, slides, and examples intended to clarify material presented in class. Such material will be posted here.

Section 02: Boolean in CThe nature of Boolean in C, typing in comparison operators, and why assert(b != 0) is functionally equivalent to assert(b).
Section 03: Side Effects and Information FlowLooking at function calls through the lens of information flow. How sides effects affect functions, and where are they coming from.
Section 03: Identifier ScopeA quick refresher on scope of variables and constants.
Section 04: Drawing MemoryHow to draw all five memory sections and what goes where.
Section 05: Pointers, part 1A high-level explanation of pointers in C.
Section 05: Pointers, part 2A behind-the-curtain explanation of pointers in C using the memory model.
Section 06: Communication ChannelsCommunication Channels between Functions and the Effect of By-value vs. By-reference Parameters in Function Calls on Stack Memory
Section 10: Memory Management and Pointers, part 1How to Store a Single Value (struct) in Stack Memory.
Section 10: Memory Management and Pointers, part 2How to Store a Single Value (struct) in Heap Memory.
Section 10: Memory Management and Pointers, part 3How to Store an Array (of struct) in Stack Memory.
Section 10: Memory Management and Pointers, part 4How to Store an Array (of struct) in Heap Memory.
Section 10: Memory Management and Pointers, part 5How to Store an Array (of struct *) in Stack Memory and the Data (struct) in Heap Memory.
Section 10: Memory Management and Pointers, part 6How to Store an Array (of struct *) and the Data (struct) in Heap Memory.
Section 10: Revisiting Communication ChannelsCommunication Channels between Functions and the Effect of By-value vs. By-reference Parameters in Function Calls on Heap Memory.

Lecture Examples

Example code from lecture will be added to this section as it becomes available:

Other Documents

Textbooks

We will also be using C Programming: A Modern Approach, by K.N. King. (Recommended/Optional Textbook)

  • On reserve in the DC library for a 3-hour loan, call number: UWD 1406
Valid XHTML 1.0 Strict Valid CSS!

Last modified on Wednesday, 29 July 2020, at 09:08.