QUEUE Implementation | using Linked List | Python in 10 minutes

preview_player
Показать описание
Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.

Link to Python Notebook:
Рекомендации по теме
Комментарии
Автор

hello Nice video i just have one doubt
self.last.next = new_node;
self.last = new_node; # why newNode should be the last itself we have already pointed the new node with last.next then why need of self.last = new_node

Thanks

nishantbhushan
welcome to shbcf.ru