JEG2
Advent of Code - Day 9
Note: This topic is to talk about Day 9 of the Advent of Code.
For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.
Most Liked
sasajuric
This is my solution to day 9. On my machine it takes some 3.5 sec for the second part. The key idea in my solution is to use zippers to implement a circular list.
JEG2
Here’s my solution to Day 9:
Inspired by @josevalim, I live streamed the creation of it for the first time. You can watch the video here (until it falls off Twitch 14 days from now):
The main idea is just that I hand-rolled a doubly linked list and used that to solve both problems. It does part two in a little under a minute. I’m looking forward to seeing how others do it faster.
davydog187
Here’s my naive solution use a single list. The implementation was too slow to solve the second part. https://github.com/davydog187/advent_of_code/blob/master/advent_elixir/lib/advent_elixir/day_9.ex
poligen
Thank you so much to reply here !!@sasajuric. It is the most important key to solve this problem using your zipper list. I learn a lot from this zippers.









