Sunday, 9 March 2014

        This week we continued working with and manipulating linked lists. The lab this week seemed easier because I can more easily visualize the structure of a linked list. I find that the simplest way to understand linked lists is to visualize it in its connected form as lists made up of an item (value) and the remaining list (rest), for example: BST(BTNode(8, BTNode(4, BTNode(2, None, None), BTNode(6, None, BTNode(12, BTNode(10, None, None), BTNode(14, None, None)))) Another way to visualize a linked list with more clarity is: 
|1-|-->|3-|-->|98-|-->|5-|-->|77-|-->|4-|-->|X-|
However, to me, it is important to view the list as being linked with a head that so the first example is more clear. Visualization is very important as I am working on my Assignment 2 part 1, where I have to set up a Tree classes, without much implementation, other than __init__, __repr__, __eq__. This involves mainly planning the Tree. In lectures this week, we continues learning about linked lists and I learned a new way to represent a list - by flipping a Tree on its side. I had continued practice with changing linked lists in various ways. 

No comments:

Post a Comment