- What is Linked List ?
- Creating Linked List
- Issue and solution to creating a node in Java
- Deleting a Node from Single Linked List
- The Runner Technique
Resurcive Problems
- Fundamental
- Content of the chapter
- What left behind the topic ?
- What is the difference between first-read and now ?
- Questions to practice
- Node
- Data
- Reference to next node
- Head: reference to first node
The whole idea of the iterator is to provide an access to a private aggregated data and at the same moment hiding the underlying representation
- AnyType next() - returns the next element in the container
- boolean hasNext() - checks if there is a next element
- void remove() - (optional operation).removes the element returned by next()
- wrap this with head
- Check null pointer
- Upadte Head / Tail pointer
- Detecting a circular linked list
- One fast and one slow, eventually they will be in the same node sometimes
- Fix Size (Array) vs Dynamic (Link)
- Easier Insertion and Deletion (Link)
- Random Access(Array) vs Access Sequentially (Link)
- More Memory (Link)
- Better Cache locality (Array)