CP164 Lecture Notes - Lecture 14: Linked List, Linked Data Structure, Priority Queue

149 views3 pages
School
Course
Professor

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)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents