lane icon indicating copy to clipboard operation
lane copied to clipboard

Generic PriorityQueues, Queues, Stacks, and Deque data structures for Go

Results 9 lane issues
Sort by recently updated
recently updated
newest added

Are these data structures safe to manipulate from multiple goroutines, or should we use explicit channels / locks to enforce thread safety?

What do you think about a `Get(index int)`-like method to get an arbitrary element from a queue in `O(n)` by iterating the linked list?

Could Queue get a `NewCappedQueue()` edition for fixed-size FIFO queues?

Hello! I think that making Lock/Unlock optional would be vital, for instance, if someone will wrap and lock there (wrapper). ` if pq.autoLock { pq.Lock() defer pq.Unlock() } `

when i loop a queue to filter element ,it can't do it. so i think you should add the loop function

@oleiade when i use Queue's example ,the result is endless loop . the @code: var queue *Queue = NewQueue() // Let's add the incoming clients to the queue queue.Enqueue("grumpyClient") queue.Enqueue("happyClient")...

I'd like to use lane to store a variable list of things where the oldest items are only the ones being removed and the newest go in front. Naturally, a...

http://en.wikipedia.org/wiki/Circular_buffer

feature

http://en.wikipedia.org/wiki/Skip_list

feature