25th December solution - Advent of Code 2020 - swift

As part of Advent of Code (adventofcode.com) each day there are two programming tasks to be solved. All solutions are listed here.

I am writing the solutions in Swift with the Playground environment in xCode.

Tasks - 25th December 2020

  1. Unlock made up encryption.

For a more detailed description of the tasks check this out.

The cardsPublicKey and doorsPublicKey variables the values given to each member by Advent of Code, which is individual for each user.

Here is the solution:

Overview of all solutions of 2020:

Advent of Code 2020 Solutions Overview

24th December solution - Advent of Code 2020 - swift

As part of Advent of Code (adventofcode.com) each day there are two programming tasks to be solved. All solutions are listed here.

I am writing the solutions in Swift with the Playground environment in xCode.

Tasks - 24th December 2020

  1. Flip colored tiles on heaxgonal tiling grid and count the number of black tiles facing up.

  2. Play game of life with the result of 1.

For a more detailed description of the tasks check this out.

The lines variable is an array of lines in the txt files given to each member by Advent of Code, which is individual for each user.

Here are the solutions:

Overview of all solutions of 2020:

Advent of Code 2020 Solutions Overview

23rd December solution - Advent of Code 2020 - swift

As part of Advent of Code (adventofcode.com) each day there are two programming tasks to be solved. All solutions are listed here.

I am writing the solutions in Swift with the Playground environment in xCode.

Tasks - 23rd December 2020

  1. Simulate a game with cups.

  2. Simulate the same game but on a larger scale.

For a more detailed description of the tasks check this out.

The labeling variable is the string given to each member by Advent of Code, which is individual for each user.

Here are the solutions:

Overview of all solutions of 2020:

Advent of Code 2020 Solutions Overview