Linked lists and assignment 2 were the main topics for this week, both of which were very interesting. A linked list is not really a list in the strictest sense, it is more a recursive data structure: the entire list is contained within the root node of the tree. Each node has two attributes, its value and the next node. Thus, the only reference needed to the list is one to the root node, with the danger that if this node was at any instance not referenced to, the entire list would be destroyed by garbage collection within Python.
A linked list is to be used in binary tree form for assignment 2, which requires the parsing of a regular expression into a binary tree. My group has already finished step 1, but step 2 proposes some difficulties, especially the star node, which would possibly require comparing every possible combination of it to the matching string, and bar node, in some very specific cases.
Good Summary of the Week
ReplyDeleteNice post. Another thing I found interesting was that a linked list is a type of tree with a branching factor of one.
ReplyDeleteI guess you pretty much summarized what happened throughout the week. I agree with you that step 1 was easy to handle I think step two is a bit challenging.
ReplyDelete