This week’s lecture focused on a new data structure: the linked list. A linked list contains nodes that carry information about themselves, and the nodes following them, and we can package these nodes together using a “wrapper” to represent the linked list in its entirety so that it closely resembles a list structure. There are two ways of understanding linked lists. The first is each node contains a link to its next node, as if it were a train of elephants holding each others' tails. And the second is that each node contains the list of all the nodes to follow it.
I found working with linked lists to be finnicky. I always had to keep in mind the attributes of the node class and the wrapper class, and be careful not to "walk" over a node and not be able to access its information anymore. For this reason, I'm currently unsure as to why I would need a linked list. I enjoy learning about these new data structures, but I wish that I were taught some applications of each one. Until then, I don't foresee myself building a linked list into any of my programming projects.

No comments:
Post a Comment