Class Notes (1,016,863)
CA (584,415)
U of S (3,517)
CMPT (50)
Lecture 7

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

4 pages14 viewsWinter 2016

Department
Computer Science
Course Code
CMPT 115
Professor
Jason Bowie
Lecture
7

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
Objectives
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.
Contents
Node
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!
1
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.