Exercises completed for Advent of Code(https://adventofcode.com/) in Typescript
Day 1:
- Part 1: Find two numbers equal to 2020 from the provided numbers Input and multiply both numbers.
- Part 2: Find three numbers equal to 2020 from the provided numbers Input and multiply all three numbers.
Day 2:
- Part 1: Find a matching character between a minimum and maximum amount of times in a password. If password matches criteria, it is valid. Count how many passwords are valid in the list
- Part 2: Find a matching character at either positions indicated by the criteria. If the character is found in both or neithr positions then the password is invalid. Count how many passwords are valid in the list.
Day 3:
- Part 1: In a field of trees(#) and open spaces (.) that repeats horizontally, figure out the number of times that a user encounters trees when moving down 1 and right 3 within the field.
- Part 2: In a field of trees(#) and open spaces (.) that repeats horizontally, figure out the number of times that a user encounters trees when moving down 1 and right 1, down 1 and right 3, down 1 and right 5, down 1 and right 7, down 2 and right 1 within the field. Then multiply all the values together.
Day 4:
- Part 1: In a field of trees(#) and open spaces (.) that repeats horizontally, figure out the number of times that a user encounters trees when moving down 1 and right 3 within the field.
- Part 2: In a field of trees(#) and open spaces (.) that repeats horizontally, figure out the number of times that a user encounters trees when moving down 1 and right 1, down 1 and right 3, down 1 and right 5, down 1 and right 7, down 2 and right 1 within the field. Then multiply all the values together.