Monday 10 March 2014

Week 8: LinkedList

This week's topic is still LinkedList. Before the lecture and during the lab, I thought of LinkedList as an object containing different nodes and each node has a reference to the next node. This created great difficulty in communication with my partner during this week's lab, since he thought of LinkedList as a node that has a reference to the remaining list. The confusion was cleared in the evening's lecture. Dustin introduced to us two ways of thinking about LinkedList:

           1. lists made of item (value) and remaining list (rest)
           2. objects (nodes) with a value and a reference to other similar objects

We went through some stuff on Binary Search Tree as well. We talked about the implementation of methods like insertion, deletion, search an item on both LinkedList and BST. In terms of search of an item in these two structures, it is quite efficient to quick search an item in a BST. However, you have to go through every item in a LinkedList to find an item, which is not inefficient compared to BST.

No comments:

Post a Comment