Sunday, March 8, 2015

Week 8 - LLNode and LinkedList

This week was also a busy week because we had to hand in assignment 2 on Thursday before 10 pm and I had to do a lot of final checking and check all my function files with pep8 and change all the format preference errors.

In this week's lecture we learned a quite interesting example of python class LinkedList which use another python class LLNode in itself. This was a very interesting concept as it is very hard and confusing to understand for me at first. Basically LLNode acts like a 'value' class for the LinkedList class, where LLNode only shows its current value (like BTNode) and 'nxt' which shows a recursion of LLNode inside it. (like BTNode could also be None) LinkedList is basically its like a 'list recorder' for LLNode that shows the last BTNode in the LinkedList and the whole chain of BTNode in the LinkedList.

There was no tutorial this week due to the TA strike, and I had to do tutorial at home. However although at first it was very challenging to understand the concept of writing function and method for BTNode and LinkedList, after a few fails I started to get the hang of it, and with the help of answer sheet I was able to quickly write all the functions in the tutorial handout.

1 comment:

  1. Overall, good job, although I am a bit disappointing to see you did not write many entries in March.

    ReplyDelete