Friday, 12 February 2016

Week 5 - Linked Lists

This week we delved deeper into the topic of linked lists.

 I learned that the idea of linked lists can be perceived in two different ways. One as a nested list and another as a chain of nodes. While the latter is the more common notion, during implementation, the different methods of a linked list may be based on either conception. Thinking of linked lists as a chain of nodes involves approaching them as a collection of individual nodes which know the next node (and the previous if we are implementing a bidirectional linked list) and a wrapper class that groups them and holds the collective information. The notion of nested lists involves approaching each node as a list containing another node which in turn is another list containing another node and so forth. In the second case, there is no need of a wrapper class. It is interesting to know that there is more than one perspective one can take on when implementing linked lists. In my opinion, having multiple perspectives of the same thing is beneficial in allowing one to adopt a point of view that best suits the requirements.

So far, I find data structures very interesting and look forward to learning more data structures.


No comments:

Post a Comment