Friday, 7 March 2014

Week 8

During week 8, we have discussed mostly the two topics: one, linked list, and second, binary search tree. On Monday and Wednesday lecture, our professor introduced us the class LinkedList, which functions similar to the ordinary lists with different attributes and its unique functionality. Since I have only dealt with the simple data structures(those that uses python built in classes, such as lists and dictionaries), it was difficult to get an idea how "linking" occur in LinkedList at first. Though, drawing and labelling it value(head) and next_value(rest), helped me have a clear vision towards its structure. During Tuesday lab, our task was to create the class operations, __len__, __setitem__, delete item, and insert. Through this lab, my partner and I have spent most of the time trying to figure out the base case, and how we can use recursive calls on LinkedLists. I believe except for figuring out the proper base case, there was nothing tricky about what each operations does (how exactly, or where exactly the item is inserted/deleted etc...)

No comments:

Post a Comment