CSC148H1 Lecture Notes - Lecture 11: Linked List

85 views5 pages
School
Course
Professor
katrinasavvy and 38715 others unlocked
CSC148H1 Full Course Notes
1
CSC148H1 Full Course Notes
Verified Note
1 document

Document Summary

References: code seen in the pictures can be found on the csc148 website: http://www. teach. cs. toronto. edu/~csc148h/winter/ Some things on old tests might not have been taught yet in this class. Only tested on things up to wed, jan 31 class. Given structure of a linked list, can add to front of back: add in linkedlistnode class. If you prepend a node, front, back, and size may change: e. g. linked list with size 0. Draw yourself a picture to know what changes. List class keeps track of info about entire list. Make reference to (at least 1) node and move it along the list cur_node = self. front. Create new node and add it before self. front. If linked list exists: size can be 0, front and back = none, size is greater than0, front and back is pointing at nodes, size = 1, front and back pointing at same node. New node"s next points to old front.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents