Advent of Code 2019 Solution Megathread - Day 6: Universal Orbit Map

Jon Bristow - Dec 6 '19 - - Dev Community

Ah, BFS my old friend. I must resist booting up a gremlin database to solve this one.

Day 6 - The Problem

Cool as cucumbers we descend upon the map station on Mercury. For once, nothing is wrong, and we just need to verify the data and then plot an efficient course.

Part 1 is fairly straightforward, but slow if you're not careful. We've returned to the land of generous examples and explanations on this one.

Part 2 is a perfect place to try out your favorite way to do a modified breadth first search.

It seems like we're alternating between challenging and straightforward prompts. Oh well, at least I think we'll see some creative optimizations in the answers!

Ongoing Meta

Dev.to List of Leaderboards

If you were part of Ryan Palo's leaderboard last year, you're still a member of that!

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "Private Leaderboard" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" and a language specific one if you want.

Neat Statistics

I'm planning on adding some statistics, but other than "what languages did we see yesterday" does anyone have any ideas?

Languages Seen On Day 05

  • JavaScript x 4
  • Python x 3
  • c
  • Kotlin
  • PHP
  • Racket
  • Rust
  • Swift
. . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player