Programming Fundamentals

Reminder: Assignment 2 released

If you have any questions about Assignment 2, feel free to ask them now.

Part 1: Malloc Revision

In this section we'll briefly revise malloc.

Part 2: Diagramming Linked Lists

This tutorial will focus on Linked Lists. We'll be using diagrams to help us work with them.

For example:

visual representation of a single linked list node

representation of a linked list with a head and current pointer

Part 3: Inserting into a linked list

You'll be writing code to add a node to a linked list.

You'll have to consider some of the different scenarios that could occur.

For example:

1. An empty list:

visual representation of a single linked list node

2. A list of length 1:

visual representation of a single linked list node

3. A longer list:

visual representation of a longer linked list