Class Notes (1,053,358)
CA (602,308)
U of S (3,567)
CMPT (50)
Lecture 7

CMPT 115 Lecture Notes - Lecture 7: Linked Data, Pseudocode, Null Pointer

4 pages18 viewsWinter 2016

Computer Science
Course Code
CMPT 115
Jason Bowie

This preview shows page 1. to view the full 4 pages of the document.
Pre-Lists: Getting the hang of linked data structures
CMPT 115 lecture notes
Notes written by Michael Horsch, Mark Eramian, Ian McQuillan, Lingling Jin, and Dmytro Dyachuk
After this topic, students are expected to
1. Explain the way records can link to records of the same type
2. Use linked records in simple expressions.
3. Draw diagrams of linked records.
4. Use linked records in simple algorithms.
Element data; // placeholder type
refToNode next; // points to another node
end Node
data next
Anode record can link one node to another node.
We’ll need a node record for each element in a list.
Element is a placeholder type ; we’ll see examples that store integers or strings. . . Focus on the linking,
not the data here!
You're Reading a Preview

Unlock to view full version

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.