[Golang] Queue

preview_player
Показать описание
Today, the queue data structure!

---
Golang version: 1.19
IDE: Goland
OS: Windows
Accent: French
Рекомендации по теме
Комментарии
Автор

Hm. Doesnt Pop() method have a memory leak? You are re-slicing which means that underneath new slice will reference the same array, just wont have access to 0th element. With large queues and complex elements (ie. structs) this can pose a problem. Would you agree? Many thanks.

fringefringe
visit shbcf.ru