I&C SCI 46 Lecture Notes - Lecture 5: Linked List, Instance Variable

38 views8 pages

Document Summary

Reference variables in linked list processing/special linked lists. In this lecture we will first examine the use of references and pointers to pointers to learn alternative ways to write some linked list processing code. Then we will examine some standard variations to simple linear-linked lists: circular, header, trailer, and doubly-linked lists. We will discuss the tradeoffs between using these lists and simple linear-linked lists. Standard linear- linked list are used more often than any of these variants, but it is interesting to see what tradeoffs the variants allow. Recall that if a parameter is passed by reference, the parameter aliases the storage location of the argument. In the code, whenever we examine/change a reference parameter we are really examining/changing the argument passed to it. The parameter is bound automatically to the address of the argument and examined/stored by automatic dereferencing the address.

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