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

39 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+
$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