CP164 Lecture Notes - Lecture 14: Linked List, Linked Data Structure, Priority Queue
Document Summary
Have to return previous current and index. Already walked to data structure should walk through away. Instead points addressed to links/nodes we are interested in (previous and current) If you wanna do find call linear search and look at results of index. Don"t need all three results from linear search for some methods. Traverse singly linked list and visit every node we need. We can also go through list recursively ( not going to do yet) With linked structure we start at rear, itis not a good idea because the only thing we can see is the thing that follows, we have no way of getting to node in front. But if we start at front we can see what the next node is! Use a variable called current" current node we are visiting. Update current current is no current=curren. _next until current is. # not doing equal because none is a special value (placehollder)