9
CS2
Leon Reznik
Week 9
Set Position
•
check if
position
is within range
•
start with address of
head node
•
set
count
to 0
•
while count is
less
than position
–
follow link to
next node
–
increment
count
•
return address of
current node