2022 — Day 14: Regolith Reservoir

Member-only story

Elixir toolbox for the Advent of Code

Dunya Kirkali
4 min readJan 5, 2023

This year, I got asked a couple of times about the libraries I use for the Advent of Code in Elixir. So I decided to put together a small article to take you through my toolbox.

Graphs

For graph problems such as the ones listed below:

I tend to use libgraph which makes the experience of working with the :digraph Erlang module a delight.

In most cases you can get away with creating the graph and using the a_star/4 function or the dijkstra/3 function to calculate the shortest path.

There has been a couple of cases where those algorithms haven’t been usable out of the box but still having some helper functions (such as out_neighbours/2) makes it a breeze for you to be able to rollout your own traversal.

Another great use of this library is the fact that it has a efficient PriorityQueue implementation which has come in handy more than once.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Already have an account? Sign in

Dunya Kirkali
Dunya Kirkali

Written by Dunya Kirkali

I'm an engineering manager passionate about empowering engineers to deliver exceptional work through collaboration and innovation.

No responses yet

Write a response