Does Zig std have a double-ended queue? Something like VecDeque in Rust?
You can check the std lib docs
There are actually 4 implementations in the std library
std.RingBuffer, unfortunately isnt generic
std.fifo.LinearFifo is a generic and growable ring buffer
std.compress.flate.CurcularBuffer specific to flate compression
std.compress.lzma.decode.lzbuffer.LzCircularBuffer specific to lzma compression
std.fifo.LinearFifo
is a direct equivalent to VecDeque
from rust
If that is so, thatās questionable naming? Also, how is the LinearFifo Deque ? Whereās the methods to put and get from the āotherā end?
ah my apologies. I was focused on the ring buffer aspect of VecDeque
I overlooked the double ended features.
A double ended queue is basically an extension of a ring buffer, you can copy LinearFifo
and modify it to have a double ended API, you canāt call it a fifo after you do that ofc.
āFifiā sounds like a dogās nameā¦