Linked lists are a dynamic data structure, which can grow and be pruned, allocating and deallocating memory while the program is running. We learn how to create it by writing two classes, class linked_node and class linked_list while linked_list is a subclass of linked_node.
And there are totally four parameters we have to think about, value, next, front and back.
Insertion and deletion node operations are easily implemented in a linked list by creating 'def append' and 'def deleted'. Also, we can also decide the position where we insert or delete.
Linear data structures such as stacks and queues are easily executed with a linked list.They can reduce access time and may expand in real time without memory overhead
没有评论:
发表评论