Understanding of Linklist Node
After learning the BTNode and Binary Search Tree, we began to meet a new concept of Linklist Node. At first the concept totally confused me, but I felt glad I finally get the idea of it. One day before Term Test2 I asked my friends and knew that self.next include the whole stuff after self.data rather than only the value of the next node.
Also we have to use the idea of setting new variable such as new_code and current_node to complete a series of methods in lab practices. I love this idea, for it is easy to understand and make use of. Sometimes I forgot to think about link.size, which may make huge trouble.
In the picture, the method 'add_node' is a primary method for Linked List. For linking two nodes, creating a new node is a good and easy way.
Also we have to use the idea of setting new variable such as new_code and current_node to complete a series of methods in lab practices. I love this idea, for it is easy to understand and make use of. Sometimes I forgot to think about link.size, which may make huge trouble.
In the picture, the method 'add_node' is a primary method for Linked List. For linking two nodes, creating a new node is a good and easy way.
On the lab practice, I learned 'assert', which is an another coding statement like 'if ...not' plus 'raise ImplementedError()'. Obviously, 'assert' statement seems simpler.

No comments:
Post a Comment