oleiade / lane

Generic PriorityQueues, Queues, Stacks, and Deque data structures for Go
https://pkg.go.dev/github.com/oleiade/lane#pkg-types
MIT License
877 stars 76 forks source link

Pop but no Push in Queue? #9

Closed xwb1989 closed 9 years ago

xwb1989 commented 9 years ago

Hi,

I find it might be a little confusing that Queue has Pop() method but does not has Push(). I know normally Queue should not be used as Stack but it's weird that it should has neither or both of Pop() and Push().

xwb1989 commented 9 years ago

NVM I looked at the code and understand what's going on.

oleiade commented 9 years ago

Hehe, I've been following recommendations and concepts of the Sedgewick algorithms book. Send your reclamations to him :-)