Practice Problems
========================

Learning Objectives
-------------------
- Traversing `LinkedList` data structures

<br><br>

Problem 1
---------
**Given the `FriendLinkedList ` class composed of `FriendNode`s, how do we retrieve…:**


a. The *first* node? <br>
Write a method called `getFirstNode()` that returns the head node of a `FriendLinkedList`.


b.	The *7th* node? <br>
Practice tracing the method called `getNodeAtIndex(int index)` that returns the *nth* node.

c.	The *last* node? <br>
Practice writing a method called `getLastNode()` that returns the *last* node. <br>
Hint: The solution for part c is similar to part b.

Note: rather than writing in Eclipse, practice writing on paper.	

<br><br>


Problem 2
---------
**Create a class called `FolderLinkedList` with the elements of type `Folder` class.**

To accomplish this, in your Eclipse IDE reuse implementation from `FriendLinkedList.java` file.
Instead of `FriendNode`s, your list should have `FolderNode`s.

<br><br>


Problem 3
---------
**Given the `FolderLinkedList  ` class composed of `FolderNode`s, how do we retrieve…:**


a. The *first* node? <br>
Write a method called `getFirstNode()` that returns the head node of a `FolderLinkedList`.


b.	The *7th* node? <br>
Practice tracing the method called `getNodeAtIndex(int index)` that returns the *nth* node.

c.	The *last* node? <br>
Practice writing a method called `getLastNode()` that returns the *last* node. <br>
Hint: The solution for part c is similar to part b.

Note: each `FolderNode` contains a `Folder` as the data portion.	

Hint: Rather than re-implementing everything, reuse and modify your solution from problem 1.

<br><br>



