-🎄- 2022 Day 21 Solutions -🎄-

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • advent-of-code

    Repo of algorithms for solving Advent of Code challenges (by ekwoka)

  • adventofcode

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

  • JavaScript/TypeScript - Plain JavaScript/TypeScript, "undefined" was never so useful in life.

  • 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

    Solutions to Advent of Code puzzles in Python. (by seligman)

  • github

  • advent-of-code

    My Advent of Code Solutions https://adventofcode.com/ (by gamma032steam)

  • Github

  • AdventOfCode2022

    My AoC22 Solutions (by johnpmay)

  • Maple 1185/177

  • advent-of-code-2022

    My solutions for Advent of Code 2022 (by ypisetsky)

  • Elixir 666 / 375

  • AdventOfCode2022

    Solutions to all 25 Advent of Code 2022 in Rust 🦀 Less than 100 lines per day, total runtime of less than 1 second. (by AxlLind)

  • Link to full solution

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • advent-of-code

    my solutions for https://adventofcode.com/ (by aduhovnik)

  • Python, 115/167 part1: just calculation in a while loop using try/except, part2 - binary search

  • aoc

    One repository for all my Advent of Code solutions. (by Andrew-Foote)

  • AdventOfCode

    Hacky solutions for [Advent of Code](https://adventofcode.com), working on past problems (by AllanTaylor314)

  • Python+sympy [204/1353]

  • AoC22

    Advent of Code 2022 (by ransoing)

  • Typescript / node.js, 1178/370, Code

  • AOC2022

  • GitHub link

  • fish-shell

    The user-friendly command line shell.

  • For part one, I noticed the input being almost valid Elm code, so I wrote a few lines of Fish to generate an Elm program. Then ran it with elm repl. Elm allows out of order variable declarations so it did all the work for me.

  • Elm

    Compiler for Elm, a functional language for reliable webapps.

  • For part one, I noticed the input being almost valid Elm code, so I wrote a few lines of Fish to generate an Elm program. Then ran it with elm repl. Elm allows out of order variable declarations so it did all the work for me.

  • advent-of-code

    Python implementations for Advent Of Code (by jarshwah)

  • python using z3

  • advent-2022

    advent of code 2022 (by jstanley0)

  • Ruby 540/1917

  • AdventOfCode2022

    Solutions to Advent of Code 2022 challenges (by carrdelling)

  • Part 1 : Iterate over all nodes, solving for those for which we know their children already.

  • aoc-2022

    Repository for solutions to Advent of Code 2022 (by HoshigaIkaro)

  • advent-of-code-2022

  • Rust (code) 1352/2031 In retrospect I had no chance of solving it the fastest because I basically rolled my own algebra solver instead of pasting it into a solver like Mathematica or computer algebra library.

  • adventofcode-rb-2022

    Solutions to https://adventofcode.com/2022 (complete)

  • (Full at https://github.com/petertseng/adventofcode-rb-2022/blob/master/21_monkey_math.rb)

  • adventofcode-hs-2022

    Solutions to https://adventofcode.com/2022 (complete)

  • (Full at https://github.com/petertseng/adventofcode-hs-2022/blob/master/bin/21_monkey_math.hs)

  • advent-of-code-2022

  • AdventOfCode-Java

    adventOfCode(Language.JAVA);

  • AoC

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

  • AdventOfCode2022

  • Solution in C++ https://github.com/oginer/AdventOfCode2022/blob/master/Puzzle-21/Puzzle-21.cpp

  • advent_of_code

    My Elixir solutions to Advent of Code (by sevenseacat)

  • this was the approach I took too, in my Elixir code. https://github.com/sevenseacat/advent_of_code/blob/main/lib/y2022/day21.ex

  • adventofcode

    Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)

  • My Scala solution – to be cleaned up.

  • advent-of-code-2022

    Advent of Code 2022 (by Olegas)

  • Golang, https://github.com/Olegas/advent-of-code-2022/blob/main/cmd/day21/day21.go

  • AOC2022

    Advent of Code 2022 (by mitiko)

  • Python, Part 1, Part 2

  • advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  • adevent22python

    My python solution for https://adventofcode.com/2022

  • Python

  • advent-of-code

    My solutions to advent of code: https://adventofcode.com/ (by tcbegley)

  • Python

  • aoc2022

    Advent of Code 2022 (C#) (by p88h)

  • C# , around 200 µs each part

  • adventofcode

    Advent of Code challenge solutions (by flwyd)

  • Elixir 2506/3402 (24 minutes, 2 hours), code, thoughts

  • adventofcode

    :christmas_tree: Advent of Code (2015-2023) in C# (by encse)

  • Advent-of-Code-2022

    My solutions to Advent of Code 2022 (by fstasel)

  • Python

  • AoC2022

  • Part 1

  • adventofcode

    This repo is designed to keep track of my attempts at advent of code. Starting with 2021, might try earlier years (by ClementPinard)

  • AdventOfCode-2022-NodeJS

  • Javascript

  • aoc2022

  • C++

  • noulith

    *slaps roof of [programming language]* this bad boy can fit so much [syntax sugar] into it

  • Noulith 24/22

  • advent-of-code-2022

    actually publishing my solutions now that they're not redundant...

  • AdventOfCode

  • C++

  • advent-of-code-2022

  • advent-of-code-2022

    Advent of Code (2022) (by nikolay)

  • Go

  • Advent-of-Code-2022

    Finished snippets I did for Advent of Code 2022. (by MarioLiebisch)

  • Golang Monkey Resolver doing reverse calculation for the humn tree rather than brute forcing a solution.

  • adventofcode

    adventofcode.com solutions (by linl33)

  • advent-of-code

    In Common Lisp (by brunal)

  • My solution for reference: https://github.com/brunal/advent-of-code-2021/blob/main/2022/21.lisp

  • aoc-rust

  • Rust (5902/5411)

  • aoc

    Advent of Code (by taifu)

  • done :-)Python

  • AdventOfCode2022

  • advent2022

  • This is probably just because I have a background in optimization methods, but I found this one pretty straightforward: Python

  • advent-of-code-2022

  • Code on GitHub

  • aoc2022

  • Ruby, runs in <4ms

  • aoc2022

  • AdventOfCode2022

  • Kotlin

  • advent_of_code_2022

  • part_1

  • aoc

  • advent-of-code

    Advent of code solutions (by Fubuchi)

  • Elixir

  • adventofcode

    My solutions for https://adventofcode.com/ programming mini puzzles - written mostly as sjasmplus script (to exercise the tool and collect ideas for future development of the script language, not because it's a best choice for the task, quite opposite) (by ped7g)

  • AdventOfCode2022

  • Python AND Js https://github.com/Phil-DS/AdventOfCode2022/tree/master/day21 Started in Python, but felt that JS's better object manipulation was nicer for part 1. Saw part 2 and realized that Python's Complex numbers would be really useful here, as it allows algebra, so rewrote everything back to python, set 'humn' to 1j and just got the names of the functions in 'root'. Really nice, and nearly went with a tree to solve the 2nd part XD

  • AdventOfCode2022

  • Could anyone help me with todays task. I cannot find what is wrong. My code is here

  • AOC

    Advent of Code (by CptCookie)

  • aoc2022

  • aoc22

    Advent of Code 2022 (by Engelberg)

  • advent-of-code

  • Runs in about 1 second for all parts. https://github.com/chrisleow/advent-of-code/blob/main/2022/src/Day21.kt

  • aoc-2022

    My solutions for Advent of Code 2022, written in Rust (by beeb)

  • Rust

  • advent_of_code

  • Python

  • aoc

    AoC shares (by timothee-peron)

  • Github link

  • advent

    advent of code (by jasontconnell)

  • AdventOfCodeHaskell

    Advent of Code in Haskell

  • Haskell

  • advent-of-code-2022

    advent-of-code-2022 (by robosa)

  • Rust

  • AdventOfCode2022

    Solving https://adventofcode.com/2022 (by doingthisalright)

  • Solution to both parts

  • aoc2022

    Advent of Code 2022 (by kupuguy)

  • Didn't seem worth it to me to build a tree, I just use a dict of not-yet calculated expressions and kept churning through it evaluating anything I could until it was done. Seems fast enough. The second part has three variants for each monkey depending which value is missing. Also a chance to be a bit cutesy with sets and the live nature of `dict.keys()`. https://github.com/kupuguy/aoc2022/blob/main/day21-monkey-math.ipynb

  • aoc2022

    Advent of Code 2022 Solutions (by eutro)

  • Prolog

  • Github

  • aoc

    Advent of Code (by ramuuns)

  • aocd

    Python solution for Advent of Code 2022

  • Simple python solution

  • AdventOfCode2022

    My solutions for Advent of Code 2022. (by SLiV9)

  • Rust

  • advent_of_code_2022

  • Ruby solution I started by trying to write a treetop parser (again) to explain how this works to some friends... And skipped to problem as soon as I saw my time limit approaching.

  • advent-of-code

    Advent of Code solutions. Other years on other branches. (by foxfriends)

  • rusty-aoc

    My solutions to Advents of Code in Rust

  • My rust code (43mn for part 1 ; +1h33 for part 2) with a topological sort thanks to the crate petgraph.

  • advent-of-code-2022

  • TypeScript

  • advent-of-code-2022

  • I did it hooray! Kotlin

  • AoC2022

    Solutions to Advent of Code 2022 puzzles. (by SwampThingTom)

  • adventofcode

    Advent of code solutions (by mathsaey)

  • aoc22

  • did haskell as well (github), but kind of rewrote the `eval` part to include reverse-mathing the unknown part, i like your solver-building much more :-)

  • a2tools

    Stuff I write for my Apple //c

  • Here's the (awful) code (it was less awful at the beginning when I didn't have to shrink everything to struct arrays with members have multiple purposes)

  • advent-of-code

    Solutions for adventofcode.com (by alexandru-dinu)

  • aoc2022

    Advent of Code 2022 - if I have time lol (by jabis)

  • Part1 was happy camping - Diff here

  • adventofcode

  • "Works" though I'm thinking there may be a bug since it shows more than one answer satisfies the Monkey Math. Full code is available on github here Day 21 CPP Solution

  • advent-of-code-2022

    https://adventofcode.com/2022 (by Coda17)

  • Playing with expressions in C# (Part 1, Part 2)

  • advent-of-code

    hi (by oliver-ni)

  • aoc2021

    Advent of Code 2021 - 2023 (by dirk527)

  • Java

  • jsonnet

    Jsonnet - The data templating language

  • sed to generate a Jsonnet program for part 1:

  • AdventOfCode2022

    This year in rust. (by phord)

  • Rust

  • nom

    Rust parser combinator framework

  • I made a recursive Expr enum to hold all the expressions and then a hashmap of monkey_name to Expr to link them. Initially I had a very clumsy parser for the input, but I want to learn to drive nom. So after everything worked, I came back and rewrote the parser using nom. It's certainly more flexible, but it's more complicated and possibly slower. I managed to grok it mostly now. Makes me yearn for python, though.

  • yaah

    Yet Another AOC Helper

  • I used the yaah AoC crate this year for boilerplate stuff. Not bad, but the documentation was a little scattered. I managed to make it work, and it's been really helpful.

  • aoc-2022

    Advent of Code 2022! (by dwalker109)

  • Github

  • adventofcode-2022

    Solutions for https://adventofcode.com/2022/. (by ionathanch)

  • Racket to generate Racket and Rosette files

  • AdventOfCode2022

    My solutions to Advent of Code 2022 (by willkill07)

  • adventofcode

  • Rust

  • adventofcode

  • aoc

    Discontinued Advent of Code solutions :christmas_tree:. (by jake-gordon)

  • C#:

  • AOC2022

    AOC2022 solutions in golang (by Wraken)

  • github

  • advent-of-code-2022

    advent of code 2022 (by janiorca)

  • advent-of-code

  • z3

    The Z3 Theorem Prover

  • In the end I used Z3 Julia bindings instead. The hardest part was to get the result back from it, because I kept running into assertion violations from inside Z3

  • Advent_of_Code

    A repo revolving around attempting to solve the Advent of Code puzzles with single-statement t-sql (by adimcohen)

  • solutions

    🧠 Solutions of different problems in different languages (by win0err)

  • [Full writeup on my blog]https://work.njae.me.uk/2022/12/21/advent-of-code-2022-day-21/) and code on Gitlab

  • aoc2022

    Advent of Code 2022 - my answers

  • advent-of-code

    Advent of code (currently with python 3.11) (by x0s)

  • part 1 done with recursion

  • advent-of-code

    My AoC 2018 answers (by skagedal)

  • Day21.java: Java 19 with preview features enabled, which allows for pattern matching in switch for sealed types and records (i.e. sum types and product types) – perfect for problems like this, see the equation solver.

  • advent-of-code-2022

    This are my solutions for the advent of code 2022. (by amafoas)

  • go/golang Code

  • advent_of_code_2022

  • advent-of-code-2022

    back to rust, except i'll use libs where it makes sense (by jchevertonwynne)

  • advent_2022

    Some problems from Advent Of Code 2022 (by bokner)

  • Part 1 (3 lines): https://github.com/bokner/advent_2022/blob/main/day21/part1.sh Part 2 (15 lines): https://github.com/bokner/advent_2022/blob/main/day21/part2.sh

  • advent-of-code-go

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

  • aoc2022

  • 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