advent-of-code
AOC solutions 🎄🍵 (by masmeert)
aoc2021
By caderek
advent-of-code | aoc2021 | |
---|---|---|
3 | 3 | |
2 | 4 | |
- | - | |
7.9 | 0.0 | |
5 months ago | over 2 years ago | |
Python | TypeScript | |
- | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
advent-of-code
Posts with mentions or reviews of advent-of-code.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-03.
-
-🎄- 2021 Day 4 Solutions -🎄-
Pretty happy with this one ``` def solve() -> List[int]: seen = [] won = [] scores = [] for n in NUMS: seen.append(n) for board in BOARDS: transpose = list(zip(*board)) for i, line in enumerate(board): if (all(num in seen for num in line) or all(num in seen for num in transpose[i])) and board not in won: won.append(board) scores.append(sum(sum(num for num in line if num not in seen) for line in board) * seen[-1]) return scores
-
-🎄- 2021 Day 2 Solutions -🎄-
day02 of doing only one-liners and I already failed for the second part, it would have been a huge mess. The first part is pretty messy as well so if anyone can improve on it I would be very grateful ! https://github.com/masmeert/advent-of-code/blob/master/2021/day02/main.py
-
-🎄- 2021 Day 1 Solutions -🎄-
I actually did the same as you when I first solved it But I saw other people use the l[3] > l[n-3] trick, it didn't make much sense at first but now I get it and it's quite clever. Basically take [1 2 1 3], the windows would be w1=[1 2 1] and w2=[2 1 3], as 2 and 1 appear in both windows what really matters is w1[0] and w2[2] which are unique to each: 1+(2+1) < (2+1)+3 == 1 < 3.
aoc2021
Posts with mentions or reviews of aoc2021.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-03.
-
-🎄- 2021 Day 4 Solutions -🎄-
GitHub
-
-🎄- 2021 Day 2 Solutions -🎄-
GitHub: aoc2021_day2
-
-🎄- 2021 Day 1 Solutions -🎄-
GitHub: https://github.com/caderek/aoc2021/tree/main/src/day01
What are some alternatives?
When comparing advent-of-code and aoc2021 you can also consider the following projects:
adventofcode - Advent of code solutions
AdventOfCode2021
advent-of-code
aoc2021-rust - Advent of Code 2021 in Rust
adventofcode - Solutions for problems from AdventOfCode.com
AdventOfCode2021 - Solutions to all 25 AoC 2021 problems in Rust :crab: Less than 100 lines per day and under 1 second total execution time! :christmas_tree:
aoc - Advent of Code solutions
AdventOfCode2021.jl - Advent of Code 2021 in Julia
AdventOfCode - My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
adventofcode - My solutions to the Advent of Code challenges
advent-of-code vs adventofcode
aoc2021 vs AdventOfCode2021
advent-of-code vs advent-of-code
aoc2021 vs aoc2021-rust
advent-of-code vs adventofcode
aoc2021 vs AdventOfCode2021
advent-of-code vs aoc
aoc2021 vs AdventOfCode2021.jl
advent-of-code vs AdventOfCode
aoc2021 vs adventofcode
advent-of-code vs adventofcode
aoc2021 vs advent-of-code