Last week we talked about linked list in lecture.
Linked list is another kind of data structure. It consists
a group of nodes, with every node be the reference of next node. We defined two
classes: LLNode and LinkedList. We use LLNode to represent each node and
LinkedList to represent the whole linked list. Each node has a value and a “.nxt”,
and each linked list has a back, a front, and a size.
(linked list)
Because the TAs are still on strike, we didn’t have
lab this week. But I read the lab handout and the sample solution. This lab was
mainly about the basic property of linked list. We were asked to implement
functions like delete a node, or find a node. We haven’t use recursion in
linked list yet.
I noticed it’s really easy to forget to change the
size of a linked list after you delete or insert a node in it. I should pay
attention to it in the test. And the test is coming, I should start to do some
past papers.

没有评论:
发表评论