3 ms·
Using Zig for Advent of Code
- skribanto 4y agoNice notes, I’ve also been using Zig for AoC. Instead of that queue, I prefer to use std.fifo.LinearFifo, which instead of being backed by a linked list, is backed by a simple ring buffer. This buffer can either be statically allocated, dynamically allocated, or passed in if you have a preexisting buffer. It is very similar to what you have already implemented on your own, just bundled into its own struct