Sign in

⚠️ SPOILER ALERT ⚠️
This is a post with my solutions and learning from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/9.

My programming language of choice is python and all examples below are in python.

Key learning

  • Window sliding

Puzzle

The puzzle is to validate number in a list. A number…


⚠️ SPOILER ALERT ⚠️
This is a post with my solutions and learning from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/8.

My programming language of choice is python and all examples below are in python.

Key learning

  • Simple compiler

Puzzle

The puzzle…


⚠️ SPOILER ALERT ⚠️
This is a post with my solutions and learning from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/7.

My programming language of choice is python and all examples below are in python.

Key learning

  • Depth first search
  • Possibly on part 1: Breadth first search

Puzzle

The puzzle describes relationship between bags in different colors. A bag…


⚠️ SPOILER ALERT ⚠️
This is a post with my solutions and learning from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/6.

AWK

AWK is an useful tool in the command-line when processing text-files. It has it’s own “programming language” which makes it quite powerful.

Prerequisite understandings

Built-in variables:
There are built-in variables in AWK. These are useful to know when doing more complex calculations. In this code I will use FS and NF.

  • FS: Field seperator. It defaults to blank space " ".
  • NF: Number of…

⚠️ SPOILER ALERT ⚠️
This is a post with my solutions and learning from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/6.

My programming language of choice is python and all examples below are in python.

Key learning

  • Sets and dictionaries

Puzzle

The puzzle is about groups of persons answering questions and the goal is to count the results.

The questions are named a-z. Only questions answered “yes” to are present in the input. The questions…


SPOILER ALERT
This is a post with my solutions and learnings from the puzzle. Don’t continue
reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/5.

My programming language of choice is python and all examples below are in python.

Key learning

  • Binary numbers

Puzzle

The puzzle today is about transforming seats to seat-ids using binary space partitioning. The seats consist of 10 letters. The first 7 can be F or B and the…


SPOILER ALERT
This is a post with my solutions and learnings from the puzzle. Don’t continue
reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/4.

My programming language of choice is python and all examples below are in python.

Key learnings

  • Debugging and testing

⚠️ SPOILER ALERT
This is a post with my solutions and learnings from the puzzle. Don’t continue
reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com/2020/day/3.

My programming language of choice is python and all examples below are in python.

Key learnings

  • Functions and abstraction


SPOILER ALERT
This is a post with my solutions and learnings from the puzzle. Don’t continue reading if you haven’t tried the puzzle on your own yet.

If you want to do the puzzle, visit adventofcode.com.

My programming language of choice is python and all examples below are in python.

Key learnings

  • String handling


If you want to do the puzzle, visit adventofcode.com.

Key learnings

  • For-loops
  • If statements

Puzzle part 1

You get a list of numbers and the puzzle is: Find the two entries that sum to 2020; what do you get…

Nille

Full-stack developer in Stockholm working at Sana Labs. Python, Javascript, AdventOfCode <3

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store