











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












A linked list simply a list where each element is linked to the next one A real world example of this is a train: each car links to the car in front and behind
We have actually already seen some linked list structures in this class:
Often times linked lists are annoying to use directly, so we provide a wrapper class to:
Nodes could remember both the previous node and the next node (called doubly linked list) This makes it easier to add/remove elements and also allows you go to backwards through the list (See: Train.java)
A stack is much like putting junk in a bag:
A hash table is a very efficient way of storing Which is easier to find your HW in?
Hash tables try to make many piles of equal size to aid in searching To do this, a hash table puts every element in a psuedo-random pile To find a paper in a pile, we then simply go to the pile where it should be and find it (See: HashTable.java)