3. Advent
of
Code [Some participant] noticed 4 problems
that required algorithms on graphs:
• Day 12 where we need to compute
shortest paths to a given target (typical
algo: Dijkstra)
• Day 16 where we need to precompute all
distances from valves pairs (typical algo:
Floyd-Warshall or repeated Dijkstra) and
then traverse a graph (DFS traversal)
• Day 19 where we need to do a DFS
traversal on a graph with some smart
elimination of branches
• Day 24 where we need to do a BFS
traversal on a graph to
fi
nd a minimum
time
5. Advent of Code
Possible challenges
• Write solution and post as fast as possible
• Write beautiful code
• Write code for solution
fi
rst part
that will be easy adaptable to solve also second one
• Write shortest solution possible (code gol
fi
ng)
6. Advent of Code
What for can you join it?
• Improve parsing
fi
les abilities. Read more rubyapi.org
• Revisit some algorithms, or learn new :)
• Compare your solution with:
• other languages
• other Redit users (with nice visualisations and memes)
• test ChatGPT3
• Have fun with great puzzles
10. What I discovered during code golfing?
• More about control
fl
ow @ ruby
• STD lib functions
• scripting switches with $ can be useful
• Better parsing
fi
le abilities
• less code is not easier to understand :D