emirpasic/gods ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go library of common data structures, like lists, sets, stacks, maps, queues, trees, and heaps.

I want it to feel easy to use from normal Go code, with simple constructors, basic methods like add, remove, get, size, clear, and string output, plus iterators for the ordered types. Please include the main versions people would expect, like array and linked lists, hash and tree based sets and maps, red black and AVL trees, B tree, binary heap, priority queue, and linked list and array based queues and stacks.

Make sure the ordered containers can be traversed in order, support sorting where it makes sense, and can be serialized to and from JSON. Add a few small examples and tests so I can see how each structure is used.

If you need to check current Go docs or best practices while wiring it up, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab