What is a Queue and Implementing a Queue class in Python

preview_player
Показать описание


Follow/Connect with me on:
Рекомендации по теме
Комментарии
Автор

Thank you so so much 😊😊
Please do stacks and more data structures!

franky
Автор

good video. something to think about the node reassignment in an enqueue can be a difficult part to learn due to tracking the head and tail. your accidental reference of calling the tail the "head" could confuse the learner.


also:
def set_head_and_tail(self, head, tail):
self.head, self.tail = head, tail


could you turn that into a one liner? is readability more important than reducing lines?

coreywoolnough