-🎄- 2021 Day 16 Solutions -🎄-

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

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. advent-of-code

    My Advent of Code solutions (by premun)

    My solution was to pretend it's a Stream and treat is one using a small abstraction: https://github.com/premun/advent-of-code/blob/main/src/16/BitReader.cs

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. aoc2021

    Advent of Code 2021 - my answers

    Looks somewhat similar in approach to mine, but instead of keeping track of the number of bits consumed myself, I simply re-use the position that it already keeps track of, plus a tiny bit of user-specified state so that I can parse directly from the hexadecimal representation, no need to build an intermediate String for the binary representation.

  4. nom

    Rust parser combinator framework

    Parsing is made by implementing an Iterator giving next bits on every iteration. It may be interesting to write nom parser for this format - I've chosen to write everything by hand. I think it turned out pretty well, my solution runs in 6ms for both parts.

  5. advent-of-code-2021

    Advent of Code 2021 https://adventofcode.com/2021 (by bozdoz)

    Here's my Day 16 if you're interested: https://github.com/bozdoz/advent-of-code-2021/tree/main/16

  6. advent-of-code

    Advent of Code (by morgoth1145)

    Python 3 143/89

  7. Advent-Of-Code

    My solutions to all Advent of Code questions (by Biggergig)

  8. adventofcode

    My solutions for Advent of Code (by fireduck64)

  9. SaaSHub

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

    SaaSHub logo
  10. advent-of-code

    My Advent of code files (by timrprobocom)

  11. adventofcode

    Solution

  12. advent-of-code

    TypeScript solutions for Advent of Code (by Grazen0)

    TypeScript: https://github.com/ElCholoGamer/advent-of-code/blob/main/src/days/2021/16.ts

  13. adventofcode

    Advent Of Code 2018 - 2021 (by nsmaciej)

  14. advent

    Git mirror of https://bitbucket.org/sjl/advent (by sjl)

  15. AdventOfCode-Java

    adventOfCode(Language.JAVA);

  16. Advent-of-Code-2021

    Advent of Code Solutions 2021 in Python (by DenverCoder1)

  17. AdventOfCodeCSharp

    My AoC Solutions

    C# 2283/1968

  18. aoc2021

    Advent of Code 2021 Solutions (by nlowe)

    Go, 2758/2421

  19. advent-of-code-2021

    Advent of Code 2021, solved using Rust (by klimesf)

    Rust

  20. adventofcode

    Advent of Code challenge solutions (by flwyd)

    Raku, 2388 / 2366, which suggests that everyone else who worked at my pace also quickly realized that part 2 would be "Evaluate the stack of values."

  21. advent_of_code

    C# (2247,3170) Recognize from part 1 that this is gonna be a pseudo programming language. Spent most of part 1 implementing lexer and parser. For part 2, i implement a Visitor pattern for fun but got bogged down with "number too low" in debugging while the logic is already correct.

  22. advent-of-code

    Perl Original solution was full of substr(), in last commit it's much more tidy... I left few die() asserts here and there in case I wanted to mess with the code again ;)

  23. aoc

    Advent of Code (by quickthom)

    Python 3 (3546/3543), object-oriented solution

  24. deno_aoc

    🎄 Advent of code solutions written in TypeScript for Deno.

  25. AdventOfCode2020

    Advent of Code (by LennardF1989)

  26. advent

    🎄 My Advent of Code solutions (by rossmacarthur)

    Rust iterator approach

  27. adventofcode

    source

  28. advent-of-code

    My solutions to advent of code problems (by dopplershift)

    Python 3 1903/1496 (GitHub)

  29. toybox

    C# https://github.com/LEPT0N/toybox/commit/f18b2e492a697d65bfb274e441fbb2dde439abc6 Probably took me longer to parse the instructions! Got to use BitArray, which is fun since I've never had a reason to do that before.

  30. advent-of-code

    Common Lisp. Christ this was a sad day. I probably had part 1 in 40 minutes (or I would have if emacs didn't start hanging which necessitated a huge apt-get update/apt-get upgrade 40 minutes in), but then I got hung up until ~3hrs by the "padding" stuff and trying to parse more than one root-level packet from the string. Uggghhh.

  31. advent-of-code

    My solutions for the Advent of Code (by JesperDramsch)

    Today was rough. Code is too long to post here. Github Basically using indexes and a bit of recursion for this.

  32. advent-of-code-2021

    Advent of Code 2021 Java 17 (by zebalu)

    Java, the code is still a mess, but if you need some tips, it might help.

  33. aoc2021

    Python

  34. aoc-2021

    PHP

  35. aoc2021

    Advent of Code 2021 on my homemade 16-bit CPU SCAMP (by jes)

  36. advent-of-code

    advent of code (by fridokus)

    On github

  37. aoc2021

  38. advent-of-code

    AoC! (by pevdh)

  39. AdventOfCode2021-python

    My algorithms for AdventOfCode2021 in python

    Using Python3

  40. adventofcode

    Advent of code solutions (by mathsaey)

  41. advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  42. Advent_of_Code_in_Pascal

    My solutions to the Advent of Code, in Free Pascal

    Pascal 7079/6330 - github

  43. aoc-2021

    Advent of Code 2021 (by mintopia)

    Parsing

  44. advent-of-code-2021

    zig solutions to advent of code 2021 (by jchevertonwynne)

  45. adventofcode

  46. advent-of-code

    My Advent of Code solutions through the years - mostly JS (by davidsharp)

    I enjoyed this one, despite all the reading. Felt like a nice change of gear from yesterday's. Using recursion to read sub-packets from the binary string, using a function that returns the value (or version sum in part 1) as well as the length, so I know where to read from for the next sub-packet.

  47. adventofcode

    https://adventofcode.com/2021/ (by Torakushi)

  48. AdventOfCode

    GitHub

  49. advent-of-code

  50. advent-of-code

  51. advent2021

  52. AdventOfCode2021

    Advent of code 2021 (by marcodelmastro)

  53. aoc2021

    Advent of Code 2021 (by sotolf2)

  54. Advent-of-Code

    bad christmas spaghett (by YelovSK)

    GitHub link - I didn't know how to call my parse_packet function if I got a specific length vs a number of packets in the operator, so if I get a specific length I call the function recursively and if I get a number of packets I call it N times without recursion.

  55. aoc2021

    Advent of Code 2021, in Rust (by Killavus)

  56. aoc2021

    My solutions to Advent of Code 2021 puzzles in Python 3. (by st-vincent1)

  57. advent-of-code-2021

    Discontinued Code I used for solving https://adventofcode.com/2021 (by pavel1269)

  58. adventofcode

    Advent of code (by Peter554)

  59. aoc

    Rust

  60. Advent-of-Code

    My solutions for the Advent of Code challenages (by Stannislav)

    Python 3.10: source

  61. AdventOfCode2021

    Loved today's puzzle after I didn't really enjoy yesterday's at all. Solved it in Python and finally installed Python 3.10 for it - gotta say that Python is slowly becoming okay for language implementation stuff :D https://github.com/SV-97/AdventOfCode2021/blob/main/Day_16_2/main.py

  62. adventofcode2021

    Discontinued Advent Of Code 2021 Solutions (by agardes)

    AoC is definitly getting harder. After giving up on yesterday's (for now) I'm kinda glad I managed today's. Javascript solution

  63. advent-of-code-2021

    AOC in go (by alextanhongpin)

  64. aoc2021

    Advent of Code 2021, this time in Go (by danvk)

  65. advent-of-code-2021

  66. adventofcode2021

    Classic recursive descent https://github.com/schoelle/adventofcode2021/blob/main/16-go/decode.go

  67. Advent-of-code

    Advent of code (by blueedgetechno)

  68. advent-of-code

  69. adventofcode

    ES6 solutions to Advent of Code puzzles. (by surgi1)

    both parts

  70. advent-of-code-2021

    Rust

  71. AdventOfCodeHaskell

    Advent of Code in Haskell

    Haskell. Reading the input in a monadic way with State, the rest is quite straightforward.

  72. advent-of-code-solutions

    My solutions to puzzles at https://adventofcode.com/

    part1.rb

  73. Advent_of_Code2021

    Solutions to Advent of COde 2021 (by cettt)

    Well save to say, this was my least favorite puzzle since 2018: and I still had a lot of fun :) I used two global variables: one keeping track of the current index and adding up the version numbers. I am praying that there won't be a follow up on this :D github

  74. coding_challenges

    Various Coding challenges with my solutions (by BigPeet)

    main.rs and lib.rs.

  75. advent-of-code-2021

    Advent of Code 2021 in 25 programming languages (by urholaukkarinen)

    main.cr

  76. AdventOfCode2021

    Some solutions for as much of advent of code 2021 as I can be bothered to do. (by TomHemery)

    C# Github

  77. advent-of-code

    In Common Lisp (by brunal)

  78. AdventOfCode

    C# solutions for Advent of Code (by Rekkonnect)

    Link

  79. advent_of_code_2021

    Advent of Code 2021 in Rust (by tslater2006)

    Here is my Rust solution.

  80. AoC

    Advento of Code - Day 11 simple simulation (by vendash)

    Github

  81. advent

    My Advent of Code solutions (by jakeledoux)

    Rust (GitHub)

  82. advent-of-code-2021

    Python solutions to Advent of Code 2021 (by nitekat1124)

    Python Github

  83. Advent-of-Code

    Advent of Code (by michaeljgallagher)

    Ugh, what a mess.

  84. advent-of-code-2021

    Misha's Advent of Code 2021 "hacking" (by mramendi)

  85. AdventOfCode

    My Advent of Code solutions throughout the years. Mainly C#. (by hymccord)

  86. Advent2021

  87. hello-world

    Innocent first test. (by SheepTester)

    JavaScript 21/19 [Code] [Video]

  88. Advent-of-code-2021

    Discontinued [Moved to: https://github.com/Toanuvo/Advent-of-code] (by Toanuvo)

    J solution https://github.com/Toanuvo/Advent-of-code-2021/blob/main/J/day16.ijs

  89. AdventOfCode2021

  90. specter

    Clojure(Script)'s missing piece

    For part 1, the version (and other things) are attached to the metadata of each sexp, and a Specter recursive path is used to extract all of the versions.

  91. advent_of_code

    Advent of Code solutions (by cjhubbs)

  92. code-challenges

    My solutions to various code challenges

    Ruby

  93. AoC2021

    Advent of Code 2021 (by gereons)

  94. advent-2021-kotlin

    :christmas_tree: Advent of Code 2021: Solutions in Kotlin

    Once I finally understood how the examples worked with subpackets, I was able to come up with what I think is a nice clean solution. I ended up using an Iterator that got passed around to various sealed types that would parse themselves out. I defined several extension functions on Iterator to make things easier to read.

  95. advent_of_code

    Advent of Code solutions (by domm)

  96. advent-of-code-2021

    Solutions for the Advent of Code 2021 puzzles (by lucashmsilva)

  97. AdventOfCode2021

    My solutions to https://adventofcode.com/2021 (by willkill07)

  98. aoc

    Advent of Code Solutions (by joeyemerson)

  99. advent-of-code-solutions

    My JS solutions for https://adventofcode.com/ (by AugustsK)

  100. AOC2021-in-Fortran

    Advent of Code 2021 solutions in Fortran

  101. AdventOfCode2021

    C#

  102. aoc2021

    Advent of Code 2021 (by ntsoftware)

    Here is my Python day 16 solution

  103. aoc

    Advent of Code solutions (by vodik)

    Rust

  104. advent-2021

    Discontinued [Moved to: https://github.com/Crazytieguy/advent-of-code] (by Crazytieguy)

  105. advent-of-code-2021

    All solutions for the 2021 Advent of Code event. (by Bruception)

  106. advent-of-code-2021

    Clojure

  107. advent2021

    Advent of Code 2021 in Rust (by cdparks)

    [Rust](https://github.com/cdparks/advent2021/blob/cdd3d94e8da7be5cbc04b5d2bf73e23c6a0b9a1b/advent/src/day16.rs)

  108. adventofcode2021

    My Solution to AOC2021 (by HrRodan)

    I used an iterator for going through the binary number. I wrote the results in a 1d array which gets cleaned up and finally converted to a string and executed with eval(). https://github.com/HrRodan/adventofcode2021/blob/master/day16/day16.py

  109. Advent-of-Code-2021-Day16

  110. aoc

    Advent of Code solutions (by fuzesmarcell)

  111. advent-of-code-2021

    My solutions to advent of code 2021 in deno/TS (by J-Swift)

  112. aoc_2021_rust

    Advent of Code 2021

  113. adventofcode

    Advent of code solutions (by SuddenGunter)

    first AoC this year that forced me to write a lot of unit tests, so I at least build the solution in a block-by-block basis, instead of writing the whole thing as a single piece of code https://github.com/SuddenGunter/adventofcode/tree/main/2021/day16

  114. adventofcode

    Very Concise AoC solutions - 2020 in Rust, 2021 in Julia, 2022 in Kotlin, 2023 and 2024 in Python (by LiquidFun)

    Kind-of code golfed and hacky solution. Prints both part 1 and 2. Repo.

  115. adventofcode2021

    🎄 Advent of Code 2021 in R 🎄 (by bodkan)

    R solution

  116. aoc-2021

    PHP solutions to https://adventofcode.com/ for 2021 (by Belzebell)

    PHP Recursive Function

  117. aoc2021

    Solutions to advent-of-code (https://adventofcode.com/) for 2021 (by fizbin)

  118. aoc2021

  119. Javascript

  120. advent-of-code

    Advent of code solutions (by rbusquet)

  121. advent-of-code-2021

    Github

  122. AOC2021

  123. AdventOfCode

    Advent of Code Solutions (by auxym)

  124. advent_of_code

  125. AdventOfCode2021FSharp

    Solutions for Advent of Code 2021 in F#

    F# with Jupyter Notebook. Learned how to use recursive types today! Half-way through the problem I was starting to wonder whether BITS was going to be the new IntCode.

  126. AdventOfCode2021.jl

    Advent of Code 2021 in Julia

  127. advent-of-code-2021

    Advent of Code 2021 (by cylab)

  128. advent-of-code

    Common Lisp

  129. adventofcode

    My collection of Advent of Code solutions in a slightly overkill project setup 🙃👻 (by marcelblijleven)

  130. advent_of_code_2021

    Solutions for Advent of Code 2021 (by ropewalker)

    Okay, I am posting it here for the sake of completion, but I don't think it is any good, and I didn't like the problem much. Rust: https://github.com/ropewalker/advent_of_code_2021/blob/master/src/day16.rs

  131. advent-of-code-2021

    🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2021

    Part 2 0.022ms (22μs)

  132. PyJpegDecoder

    A JPEG decoder made in Python, that supports both baseline (sequential) and progressive images.

    Not too long ago I made a JPEG Decoder in Python, which used a similar logic than the current puzzle, but on steroids. This gave the the skill set to tackle the puzzle in a relatively efficient manner.

  133. AdventofCode2021

  134. aoc-typescript

  135. AdventOfCode

    My solutions to the Advent of Code puzzles. (by codevogel)

  136. adventofcode

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

    F# Late to the party, easy puzzle today helped me to finish F# implementation for day 16. Used List.unfold probably for first time, referred a lots of F# solutions posted here, learning a lot, Thanks again.

  137. Advent-of-code-2021

    Discontinued C solutions to AoC 2021 [GET https://api.github.com/repos/rprtr258/Advent-of-code-2021: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] (by rprtr258)

    C

  138. AdventOfCode2021

  139. advent-of-code-2021

    https://github.com/fbl100/advent-of-code-2021/blob/master/day_16.py My first attempt at this was really ugly. The second attempt used a buffer that keeps track of the current position, which was much cleaner and resulted in everything just 'falling into place'. I say that until I got the part 2 answer wrong. I had to figure out why a negative number was getting into the mix on my evaluations. Check line 221-223 if you're interested.

  140. aoc-2021-in-kotlin

  141. Advent_of_Code

    My Advent of Code solutions. (by Farbfetzen)

    My solution in Python. This one was fun! Thanks for the many samples and the detailed description.

  142. aoc

    Solution

  143. AdventOfCode2021

    Advent of Code 2021 challenge: 13 different languages, one chosen at random every day! (by Qualia91)

  144. advent-of-code

    My Advent of Code submissions (by DecemberDream)

    Python day 16. In part 1 I apparently do the parsing from hex to binary wrong, however, it works. This gave me problems in part 2 so I reworked that (and the rest of the code).

  145. advent-of-code-go

    All 10 years of adventofcode.com solutions in Go/Golang (and a little Python); 2015-2024

  146. 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

  • [2022] [Angular / Typescript] Collection of all visualizations I created this year as an interactive website

    2 projects | /r/adventofcode | 28 Dec 2022
  • [2022 Day 4] [Angular / Typescript] Interactive website to visualize your inputs

    1 project | /r/adventofcode | 4 Dec 2022
  • Demystifying bitwise operations, a gentle C tutorial

    2 projects | news.ycombinator.com | 3 Mar 2023
  • -🎄- 2022 Day 15 Solutions -🎄-

    140 projects | /r/adventofcode | 14 Dec 2022
  • How to organize Rust code for Advent of Code puzzles?

    2 projects | /r/adventofcode | 11 Dec 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?