In this week, we are introduced a new tree structure, linked list tree.
The structure of node class is:
class LLNode:
"""Node to be used in linked list
nxt: LLNode -- next node
None iff we're at end of list
value: object --data for current node
"""
def __init__(self, value, nxt=None):
"""(LLNnde, object LLNode) ->NoneType
Creat LLNode (self) with data value and successor nxt.
"""
self.value, self.nxt = value, nxt
Unfortunatly, because of the strike, we didn't have the extra help to guide us to the right direction especially that it is a new concept. The lab was not too bad, and by reading through other slogs, the concepts of LLNode is not big deal for me. But I still need to practice the labs. More practice needs to be done with all the methods given in this lab.
没有评论:
发表评论