CS 106B Lecture Notes - Lecture 19: Linked List, Null Pointer

59 views2 pages

Document Summary

Midterm results: median of 50 points, results will be posted right after class today. Can request regrade by friday (entire exam might be graded) Linked list: a linked list is a chain of nodes, each element is stored separately from the rest, the elements are then chained together into a sequence, practice with pointers. Create a new pointer that points to a node. Use -> to set the value of the node to which the pointer points. If you create another pointer and set it equal to the original one, both of them point to the same object. You must have (cid:498)delete(cid:499) statements when you take memory. Stack for yourself: has only one pointer that points to the stack, to add another value to stack. Create new node and point to the new value. Point the new value to the first value of the stack. Point the original node to the new value.

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