For last week, we've learnt a class called Linked List. Different from list, LinkedList is divided into two parts, an object called item and link which is also a LinkedList. As result, normal method like insert() or len() cannot be used on LinkedList. But in LinkedList class, we can design functions to help get the length of LinkedList or insert item into the LinkedList.
Still, even I know the structure of LinkedList and how to write parts of the functions, I still struggle in why we have to use this class rather than list class.
No comments:
Post a Comment