-🎄- 2020 Day 22 Solutions -🎄-

This page summarizes the projects mentioned and recommended in the original post on /r/adventofcode

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
  • advent-of-code

    My solutions for Advent of Code (by AlexAegis)

  • TypeScript

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • aoc-2020

    Discontinued My solutions for https://adventofcode.com (by ScottBailey)

  • In part1, though, vector was repeatably faster than circular_buffer. About 40us for vector and 70us or so for circular buffer. I expected circular buffer would out perform vector for this task.

  • aoc2020

    Advent of Code 2020 - my answers

  • Haskell

  • Advent_of_Code_in_Pascal

    My solutions to the Advent of Code, in Free Pascal

  • Only to find that I had wasted about 2 hours.. and had to re-implement everything, so the second time I did it quick and dirty instead. I kept the cards as strings with the deck being a single string... way, way simpler, even with the recursion, etc.

  • adventofcode

  • I added an AtomicInteger counter to each of our caching branches here in yours, and here in mine.

  • aoc2020

  • As I'm trying to optimize my solution (~3s) so I tried to check what makes your solution so fast, but it doesn't seem to work with my input. Example and part 1 works as expected, but part 2 with my input returns 8104 instead of 32665

  • aoc-2020

    Advent of Code 2020 (by aldanor)

  • Borrowed both ideas in my version :) On my input your version runs at 3ms, mine in 1.5ms, so it might be faster on some inputs (link). I initially started with something similar to yours but then figured why not use 512-bit ints, so that the notion of 'head' and 'tail' disappears as your head then stays at position 0 (so, e.g., to remove a card, you just right-shift the whole bigint). Also used a tiny bit of simd along the way.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • AoC

    my personal repo for the advent of code yearly challenge (by Fadi88)

  • github

  • AoC2020

    Programs for Advent of Code 2020 (by Perska)

  • CrabSharp (aka C#) Solution

  • advent-of-code-2020

    Done in boring old python (by peter-tanner)

  • part 1

  • advent-of-code

    Solutions for Advent of Code (by smrq)

  • Part 1 Part 2

  • Advent2020

  • Python 3, 905 on the part 2 leaderboard, which is a good position for me.

  • advent-of-code-2020

    My solutions for Advent of Code 2020 tasks (by Jozkings)

  • Python 3 (1345/540)

  • AoC2020

    Advent Of Code 2020 (by ShaoshiZ)

  • Part 1\ Part 2\ Since the script for part 2 is written in a recursive way, there is an extra step to get the final answer. The final answer can be easily obtained based on the non-empty deck.\ \ I was confused by the infinite loop prevention rule, but other than that, pretty simple puzzle.

  • advent_of_code_2020

    My Advent of Code 2020 repository (by zv0n)

  • code

  • advent_of_code

  • part1

  • adventofcode-solutions

    🎄 My solutions to https://adventofcode.com/

  • My input: https://github.com/xPaw/adventofcode-solutions/blob/d5b979f4a4fe45b5c14c290c69cb7c7d323310ec/2020/data/day22.txt

  • advent-of-code

    My solutions for Advent of Code (by besasam)

  • Python. Part 2 threw me for a loop (similar to many others here, it seems) but it's nice to be reminded to read the instructions carefully and not just rely on results from the sample inputs. Not terribly performant, but it runs quickly enough and the code is hopefully not too hard to read, so I'm quite happy with it.

  • advent_2020

    Discontinued Advent of code 2020 [Moved to: https://github.com/mattteochen/AoC]

  • part 1 part 2

  • advent-of-code-2020

    Solutions to Advent of Code 2020 (by joe-reed)

  • Go/Golang

  • advent-of-code

    Advent of Code in python3 (by lehippie)

  • Python3 solution

  • adventofcode

    Gok's Advent of Code Repo (by gokberkkocak)

  • RUST

  • AoC2020

  • Swift

  • advent-of-code

    My solutions to the Advent of Code puzzles (by meckenbach)

  • Here are all my Python solutions so far in a Jupyter notebook, including today's one.

  • AdventOfCode

    My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA

  • Python, placed 454/29. Code: https://github.com/jonathanpaulson/AdventOfCode/blob/master/2020/22.py. Video of me solving: https://youtu.be/iD4R7wSNrdw

  • advent-of-code-2020

  • Python, 138/16. code (permalink) & screen recording

  • adventofcode

    Solutions for Advent of Code over the years (by sburuiana)

  • C++ 324/394

  • advent-of-code-go

    All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022

  • Go Solution 537/997

  • AdventOfCode2020

    Advent of code 2020 repository. (by Tomas-Juri)

  • C#

  • Advent-of-Code-2020

    My solutions for Advent of Code 2020 (by kermitnirmit)

  • Python3 my solution. Takes a few seconds for part2.

  • advent-of-code-2020

    Answers and solutions for Advent of Code 2020. (by Bruception)

  • Python3 simple solution.

  • adventofcode

  • AoC 2020 Day 22 - Kotlin. 2094/2452

  • Advent-of-Code

    Advent of Code (by michaeljgallagher)

  • Finished part 1 in 8 minutes, then proceeded to take over an hour to finish part two. Re-wrote the while loop maybe 5 times and got 5 different answers from my input, yet it would always pass the test cases

  • Golang

  • aoc-2020

    My solutions to Advent of Code 2020. (by Fryer)

  • JavaScript 2291/1888

  • aoc2020

    Advent of Code for 2020 (by UnicycleBloke)

  • Python (1906/2343): https://github.com/UnicycleBloke/aoc2020/blob/main/day22/day22.py

  • https://gitlab.com/t-rkr/advent-of-code-2020/blob/master/day22/day22.pl

  • AdventOfCode2020

    Solutions for the Advent of Code 2020 challenges in Java. (by SizableShrimp)

  • Java, 417/312. https://github.com/SizableShrimp/AdventOfCode2020/blob/master/src/main/java/me/sizableshrimp/adventofcode2020/days/Day22.java

  • adventOfCode

    Solutions to the 'Advent of Code' (http://adventofcode.com) programming challenges in Elm (by jwoLondon)

  • Literate Elm

  • advent-of-code

  • Haskell by a non-Haskell programmer ;)

  • aoc

    🎄 My solutions and walkthroughs for Advent of Code and more related stuff.

  • Python 3 solution - Walkthrough

  • AdventOfCode-Java


  • Java Fun day, I like space cards. I had minor Vietnam flashbacks to the spacecards of last year, but luckily it was nothing like that. Some takeaways:

  • aoc-2020

    Complete Advent Of Code 2020 solutions in Node.js (by lnguyenh)

  • Nodejs solution

  • AdventOfCode2020

  • JavaScript Solution day 22

  • aoc2020

    Solutions for Advent of Code 2020 (by frerich)

  • Python 3 Solution

  • aoc

    advent of code (by apparentorder)

  • advent-of-code-2020

    🎅🌟❄️☃️🎄🎁 (by mstksg)

  • [Haskell] (Taken from my daily haskell reflections)

  • advent-of-code

    advent of code (by fridokus)

  • Python 3

  • AdventOfCode2020

    Solving Advent of Code 2020, each day in a different language (by bereal)

  • Elixir

  • aoc-clojure

    Advent of code 2020 solutions in Clojure

  • Clojure: https://github.com/mgrzeszczak/aoc-2020-clojure/blob/master/src/aoc_2020_clojure/day22.clj

  • aoc2020_solutions

  • Python 3 part1, part2

  • advent-of-code-2020

  • Part 1 & 2

  • advent-of-code

    All Advent of Code solutions in Python (by taddeus)

  • python3: https://github.com/taddeus/advent-of-code/blob/master/2020/22_spacecards.py

  • hashbrown

    Rust port of Google's SwissTable hash map

  • Doesn't really matter. My original solution was just like yours, but because other people have decided to use *both* deques I've changed mine... and ... it did not work. It turned out to be a bug in hashbrown lol: https://github.com/rust-lang/hashbrown/issues/218

  • AoC-2020

    Solutions for Advent of Code 2020 (by Rtchaik)

  • Python solution with deque

  • adventofcode.com

  • Scala

  • aoc-2020

    Advent of code 2020 in Python and Rust (by TamTran72111)

  • These are my solutions in Python and Rust, which run in 2.5s and 0.6s respectively. I am looking for some ways to improve the performance

  • aoc2020

    Advent of Code 2020, while learning Scala (by grey-area)

  • Part 2 in Scala

  • aoc-2020

    Advent of Code 2020 (by tpaschalis)

  • Any comments are more than welcome! https://github.com/tpaschalis/aoc-2020/blob/main/day22/day22.exs

  • advent-of-code-2020

    Solutions for Advent of code (by abhijithasokan)

  • Code (see function - game_l2)

  • adventofcode

    Solutions for problems from AdventOfCode.com (by bhosale-ajay)

  • JavaScript/TypeScript Repo

  • Advent-of-Code

    C# solutions for Advent of Code puzzles (by DjolenceTipic)

  • Long day at work, the long time needed to solve all.

  • Advent-of-Code-2020

    Advent of Code 2020 written in C++ using VS code with WSL integration. (by daniel-meilak)

  • GitHub solution to Part 2

  • adventofcode2020

    2020 Advent of Code (by rocksoftcode)

  • Groovy

  • aoc_2020

    Advent of Code 2020 (by natemcintosh)

  • Julia

  • Advent-of-Code-2020

    Solutions for the 2020 Advent of Code puzzles (using javascript and NodeJS) (by chaeron)

  • All of my 2020 puzzle solutions, including giving crabs a beating are here: https://github.com/chaeron/Advent-of-Code-2020

  • comp_prog

    My solutions to competitive programming problems

  • Python3 solution on GitHub. Just simulated it. I missed the part that says that when you start a sub-game, that you should only use the first p1card and p2card amount of cards from each deck in that sub-game. Without that, it would take a very long time for the game to end (as I found out after several hours of hoping lol).

  • advent-of-code

    🎄 This is my set of awesome solutions for the Advent of Code puzzles (by garciparedes)

  • Part 1: https://github.com/garciparedes/advent-of-code/blob/master/2020/22_crab_combat_part_1.rs

  • advent_of_code_2020

    Some Ada solutions to Advent of Code 2020. (by YoannDupont)

  • Ada

  • Advent-of-Code-2020

    Made it through all 25 days of Advent of Code for the first time! (by Leftfish)

  • Here's my Python solution: https://github.com/Leftfish/Advent-of-Code-2020/blob/main/22/d22.py

  • advent-of-code-2020-jq

    Discontinued Solving Advent of Code with jq [Moved to: https://github.com/odnoletkov/advent-of-code-jq]

  • Part 2

  • adventOfCode-2020

    Code Challenges and Practice (by valiant-code)

  • Java - main & Part 2 game logic

  • aoc2020

    Advent of Code 2020 (by jacksonriley)

  • Nothing clever about it :) I just tried to use this method of hashing (since it was about 3 times faster than what I was already doing), and noticed that it resulted in the wrong answer for part 2 for my input - so it definitely does matter for some cases!

  • advent_of_code

    Solutions to programming puzzles on Advent of Code (by Praful)

  • Full source code here.

  • advent-of-code-2020

    🦀 Rust solutions to AoC 2020 (by wfxr)

  • Rust solution:

  • ruby

    The Ruby Programming Language

  • Yeah, in most languages set is just a wrapper around hash. Pretty sure that's the case with Ruby - https://github.com/ruby/ruby/blob/master/lib/set.rb

  • advent-of-code

    My solutions for the Advent of Code (by JesperDramsch)

  • Kept it fairly simple in Python. Runs in half a second for both parts together.

  • AdventOfCode-rs

    The https://adventofcode.com in idiomatic declarative Rust

  • A Rust solution which would be really easy to adopt to multiple players. It takes 70 ms for both parts.

  • Advent_of_Code

    These are my solutions to the Advent of Code puzzles. These are some of my first Python scripts, so please manage your expectations. :^) (by Nomen-Heroum)

  • Mine went down from 20062 to 16881 recursive calls, here's my code (also Python 3). Just add a global CALLS before line 7 and global CALLS; CALLS += 1 before line 17 in the if block to count the function calls.

  • aoc2020

    Haskell Solutions to Advent of Code 2020 (by haskelling)

  • Code Repository: https://github.com/haskelling/aoc2020

  • aoc2020

    Advent of Code 2020 (by sporksmith)

  • Rust, with a pretty straightforward approach.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • -🎄- 2020 Day 24 Solutions -🎄-

    78 projects | /r/adventofcode | 23 Dec 2020
  • -❄️- 2023 Day 6 Solutions -❄️-

    298 projects | /r/adventofcode | 6 Dec 2023
  • -❄️- 2023 Day 4 Solutions -❄️-

    143 projects | /r/adventofcode | 5 Dec 2023
  • -🎄- 2022 Day 21 Solutions -🎄-

    124 projects | /r/adventofcode | 20 Dec 2022
  • -🎄- 2022 Day 17 Solutions -🎄-

    62 projects | /r/adventofcode | 16 Dec 2022