phf / go-queue Goto Github PK
View Code? Open in Web Editor NEWQueue data structure for Go.
License: BSD 2-Clause "Simplified" License
Queue data structure for Go.
License: BSD 2-Clause "Simplified" License
Hi @phf
This is a nice and nicely-annotated implementation.
In your uni class, how do you explain the practical utility of dequeues? I have searched for a while and found many mentions of just this single, specialized use case pertaining to multi-processor job scheduling: https://en.wikipedia.org/wiki/Double-ended_queue#Applications That's a bit arcane.
I think it's also usable for a ring buffer, which has student-intuitive uses for data buffering.
Elsewhere I saw mention of using dequeues for undo/redo cases, although normal stacks seem ok for that...? Unless something needs to be done with the bottom of the stack... maybe because it's fixed size and the bottom needs to be evicted(?)
So, struggling a bit to come up with a tidy set of student-convincing stuff.
Thanks--
Hello @phf
Thanks for this great library. I can see concurrency is not supported and also I would like to know the status of the project.
Currently I am looping the the slice of items and adding PushBack. Will it be possible to append a slice to q.rep
as q.rep = append(q.rep, myslice...)
. I assume the q.inc()
function would have to run beforehand?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.