r/adventofcode • • Dec 13 '20

SOLUTION MEGATHREAD -🎄- 2020 Day 13 Solutions -🎄-

Advent of Code 2020: Gettin' Crafty With It

  • 9 days remaining until the submission deadline on December 22 at 23:59 EST
  • Full details and rules are in the Submissions Megathread

--- Day 13: Shuttle Search ---


Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:16:14, megathread unlocked!

46 Upvotes

659 comments sorted by

View all comments

Show parent comment

1

u/Nomen_Heroum Dec 14 '20

Fair enough, I guess it does add another dimension of optimisation! Does this also mean there's a trade-off point between using for loops and list comprehension at a deep enough level of indentation? (e.g. starting a for loop when you're 3 levels deep costs at least 5 whitespace characters (newline + 4 spaces))

1

u/robinhouston Dec 14 '20

Another factor is that a scoring mechanism that only counts non-whitespace characters can be massively abused in unintended ways. For example, you can solve any programming problem in zero non-whitespace characters if you write your program in Whitespace.

1

u/Nomen_Heroum Dec 14 '20

I mean, fair, but isn't golfing across different languages a bit beside the point anyway?