Activity 01
Pair Programming: Node Construction
Pairs define a Node class with data and next pointer, then link three nodes manually. They print the list by traversing from head, discussing pointer changes. Extend to add a tail pointer.
Design the structure of a node for a linked list.
Facilitation TipDuring Pair Programming: Node Construction, circulate and ask each pair to explain their node structure to you before they write code to ensure they understand the relationships between data and pointers.
What to look forPresent students with a small, pre-written code snippet for a linked list node. Ask them to identify the data field, the pointer field(s), and explain what each pointer is intended to reference. Then, ask them to write the code for adding a new node to the beginning of the list.