-πŸŽ„- 2021 Day 18 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
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. AdventOfCode

    My solutions for all years of Advent of Code in Python 3 and Rust (by benediktwerner)

    Interesting approach. I guess mine could be considered a bit nicer, doing it recursively and returning the number to add to the left or right.

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

    Wow! It'is almost exaclty my solution! :) https://github.com/xoposhiy/aoc/blob/main/2021/18.py

  4. aoc

    Discontinued Advent of Code - mscha's Perl 6 solutions (by mscha)

    I wasted a lot of time creating a solution with a proper object model for SFNumber, with recursive SFNParts and all, but I couldn't figure out how to do the explosion – finding the numbers β€œto the left/right” was too hard.

  5. aoc2021

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

    Here's my previous solution, which didn't use any mutation: https://github.com/danvk/aoc2021/blob/92b5352806e0e854ebc36e6c9804dc13b5262349/day18/day18.go

  6. AdventOfCode

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

    46/40. Python

  7. advent-of-code

    Advent of Code (by morgoth1145)

    Python 32/30

  8. AdventOfCodeSolutions

    My Advent Of Code Solutions (by Kroppeb)

    Code and transformed input

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. adventofcode

    Advent of Code solutions (by mcpower)

    Python, didn't leaderboard. Cleaned up code for part 1 and part 2.

  11. advent2021

    My solution

  12. AoC2021

    Advent of Code 2021 solutions (JS) (by kunalb)

  13. advent-of-code

    My Advent of code files (by timrprobocom)

    github solution

  14. adventofcode

    My solutions for Advent of Code (by fireduck64)

  15. advent-of-code

    Perl

  16. adventofcode

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

  17. Advent-of-code

    My solutions of adventofcode.com (by MichalMarsalek)

  18. AoC-2021

    Python - github

  19. adventofcode

    Haskell

  20. advent-of-code

    Solutions, scripting, and templates for adventofcode.com (by Javran)

  21. Advent-Of-Code-2021

    My solutions to the Advent Of Code 2021. Uploaded the day after each challenge. (by C2thehris)

    JavaScript

  22. advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  23. aoc2021

    advent of code, 2021 (by mattcl)

    I also really enjoyed today's problem from a "way the code feels" perspective. I, too, went the Enum route, with nom for the parsing. My part 2 runtime is 5 ms (which is one of the worst so far this AOC), though I "cheated" with a parallel iterators. I think I have some unnecessary clones, so I guess I'll look to clean that up at some point.

  24. AoC2021

    My Advent of Code 2021 solutions in Minilang (by rajamukherji)

    Part 1 Part 2

  25. aoc2021

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

  26. adventofcode

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

    My Scala solution.

  27. toybox

    C# since I don't see one posted here yet: https://github.com/LEPT0N/toybox/commit/b51ff07fc137c3e23c6b456bd5cbbcf9f744f366

  28. aoc2021

    Advent of Code 2021 (Elixir + Pygame) (by p88h)

    Elixir 934/972 ; 5ms/100ms

  29. adventofcode

    Advent of Code challenge solutions (by flwyd)

    Raku 1918/1873 at 2:23 and 2:31, which is my best score since day 1, despite taking ~20 times as long :-)

  30. Fast Parse

    Writing Fast Parsers Fast in Scala

    Mostly a mess of pattern matching. I really need to make some generic tree utilities. Haven't been able to find a decent parser combinator that works in Scala 3 (I usually use fastparse which depends heavily on Scala 2 macros, and scala-parser-combinators works in Scala 3, but I've had a lot of trouble getting it to not be too greedy), so I used the state monad from cats to parse at the bottom of the file, which I think turned out fairly nice.

  31. Scala Parser Combinators

    simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module

    Mostly a mess of pattern matching. I really need to make some generic tree utilities. Haven't been able to find a decent parser combinator that works in Scala 3 (I usually use fastparse which depends heavily on Scala 2 macros, and scala-parser-combinators works in Scala 3, but I've had a lot of trouble getting it to not be too greedy), so I used the state monad from cats to parse at the bottom of the file, which I think turned out fairly nice.

  32. Advent-Of-Code

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

  33. advent-of-code-2021

  34. aoc21

    A pretty straightforward binary tree-based implementation: https://gitlab.com/dos1/aoc21/-/blob/main/day18.py

  35. advent2021

    Advent of Code 2020 solutions in C++ (by bustercopley)

    Original

  36. AdventOfCode

    Hacky solutions for https://adventofcode.com (by AllanTaylor314)

    Python 3

  37. aoc

    My solutions to Advent of Code problems. Not good examples for anything. (by BrianDead)

    Link to code

  38. advent-of-code

    Discontinued Advent of code solutions (by Fubuchi)

  39. aoc

    Discontinued Advent of code (by payou42)

  40. adventofcode

    πŸŽ… Repo where anyone can solve puzzles from adventofcode.com (by kolonialno)

  41. aoc21

    Advent of code 2021.

  42. AdventOfCode2021

  43. aoc2021

    My aoc2021 solutions in Go (by graynk)

    github

  44. advent2021

  45. AdventOfCode

    My solutions to the Advent of Code challenge (by Jessseee)

    Python 3.8+

  46. adventofcode

    Go

  47. aoc2021

    Advent of Code 2021 - my answers

    Haskell Kotlin 622/1185

  48. advent-of-code

    advent of code (by fridokus)

  49. AdventOfCode2020

    Advent of Code (by LennardF1989)

  50. Advent_of_Code_2021

    Advent of Code for 2021 (currently in Swift) (by Loqaritm)

    Swift

  51. aoc_2021_rust

    Advent of Code 2021

  52. advent-of-code

  53. advent_of_code_2021

    Solutions for Advent of Code 2021 (by ropewalker)

  54. advent-of-code-2021

    zig solutions to advent of code 2021 (by jchevertonwynne)

  55. aoc-rust

    Rust

  56. Advent-of-Code

    Advent of Code (by michaeljgallagher)

    What a headache

  57. aoc-2021

    Advent of Code 2021 (by mintopia)

    Snailfish and Reducing/Exploding/Splitting

  58. advent2021

    Advent of Code 2021 (by arjanIng)

  59. aoc2021

  60. AdventOfCode-2021

    Code

  61. adventofcode

    Python solutions to Advent of Code puzzles, https://adventofcode.com/ (by fuglede)

    Python 3. 3 takes today: 1 using nasty string replacements, 1 using a "class Node" style implementation of a binary tree, and finally just deciding to go with a dictionary mapping leaf node positions to their values; point being that in-order traversal comes for free, and the operations to be implemented all end up reasonably simple.

  62. advent-of-code-2021

    Python solutions to Advent of Code 2021 (by nitekat1124)

    Python solution using regex, nothing fancy but it works

  63. advent-of-code-solutions

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

    At first, I thought I will be really clever by just keeping numbers as is. Well - nothing of what I did today was clever. So this is my first attempt at part 1-> GitHub link.

  64. aoc-2021

    Learning Rust by solving Advent of Code (code review is welcome) (by mvolfik)

  65. adventofcode

    Advent of code solutions (by mathsaey)

  66. advent-of-code-2021

  67. advent-of-code-2021

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

    List-based solution - runs part 2 in 2s.

  68. aoc2021

  69. AdventOfCode2021

    Python + Regex Magic: https://github.com/TynanWilke/AdventOfCode2021/blob/main/18/explode1.py https://github.com/TynanWilke/AdventOfCode2021/blob/main/18/explode2.py

  70. Advent_of_Code_in_Pascal

    My solutions to the Advent of Code, in Free Pascal

    Pascal - Github

  71. AoC_2021

    Discontinued advent of code 2021 (by jwezorek)

    github

  72. AdventOfCode2021

    Advent of code 2021 (by marcodelmastro)

  73. aoc2021

    Advent of Code 2021 (by eoincampbell)

  74. adventofcode_2021

    AdventOfCode 2021 (by aelzeiny)

    Python 3 Readable Binary Search Tree Implementation

  75. adventofcode2021

    Advent of Code 2021 in Elixir (by hermanstehouwer)

  76. AdventOfCode2021

    Full program on GitHub.

  77. adventofcode

    Advent Of Code 2018 - 2021 (by nsmaciej)

    I did something super similar, except initially I only kept track of opening brackets. It actually worked really well but the code is much simpler if I also track the closing brackets. Takes around 7.5ms for both parts on my machine. https://github.com/mgoszcz2/adventofcode/blob/master/2021/src/day18.rs

  78. adventofcode

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

    TypeScript, Worked with a flat structure which tracks [value, depth], taking about 200ms to solve part 1 and part 2 for test and actual input.

  79. AoC-2021

    Solutions to Advent of Code (https://adventofcode.com/2021) (by InfinityByTen)

    Rust

  80. aoc2021

    Solutions for the Advent of Code 2021 (by jkaye2012)

  81. AdventOfCode2021FSharp

    Solutions for Advent of Code 2021 in F#

    F# solution in Jupyter Notebook. Thank God for the Haskell programmers! I would not have been able to solve this without peeking at their some of their code. Parsing the input string was just the first of the challenges! I envy those dynamic programming languages with an eval function.

  82. Advent-of-Code-2021

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

    As a complete hobbyist, I was glad I figured out this had something to do with binary trees. It took about an hour to design everything on paper. Then I started to code it...and then debug...and four hours later I finally arrived at this solution.

  83. sbailie-aoc-2021

    Python (using regex)

  84. aoc

    Advent of Code Solutions (by joeyemerson)

  85. AdventOfCodeCSharp

    My AoC Solutions

    C# 3406/9233 :oof:

  86. advent-of-code-2021

    Advent of Code 2021 solutions and test runner (by delventhalz)

  87. nom

    Rust parser combinator framework

    Wrt. parsing, my AOC-experience is that rust works really well with recursive descent parsers probably because of the combination of native slices and enum returns. You can use parser combinators like nom, but with Context for error handling it is often just as concise to do without. This is what I had for parser today:

  88. adventofcode

    Advent of code in rust (by Japanuspus)

    My rust solution

  89. AdventOfCode2021

    My solutions for the 2021 Advent of Code problems. (by Goldenlion5648)

    Python

  90. advent

    advent of code (by jasontconnell)

  91. AOC2021-in-Fortran

    Advent of Code 2021 solutions in Fortran

    Part 1

  92. advent-of-code-2021

  93. aoc2021

    Advent of code 2021 (by pbruyninckx)

    github

  94. advent-of-code

    Discontinued My Advent of Code answers [GET https://api.github.com/repos/tcsullivan/advent-of-code: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] (by tcsullivan)

    Clojure. GitHub.

  95. adventofcode2021

    My Solution to AOC2021 (by HrRodan)

  96. AdventOfCode2021

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

  97. AdventofCode

    Github

  98. advent-2021

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

  99. deno_aoc

    πŸŽ„ Advent of code solutions written in TypeScript for Deno.

  100. advent-of-code-2021

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

  101. adventofcode

    Solutions for Advent of Code (by tipa16384)

  102. AoC2021

    Python using a graph of nodes.

  103. advent2021

    Python

  104. advent-of-code-2021

    My solutions to Advent of Code 2021 problems (by juanplopes)

  105. adventofcode

    Answers to Advent of Code (by viceroypenguin)

  106. AdventOfCode

    Python

  107. advent-of-code-2021

    Advent of Code 2021 solutions (by paolostyle)

    Rust

  108. advent-of-code-2021

  109. AdventOfCode

  110. advent-of-code

    Common Lisp Truly ugly day, took me about 4 hours for part 1 and submitted more than 24h past the puzzle for the first :(

  111. advent_of_code_2021_v2

  112. advent-of-code

    Advent of Code Solutions (by karjonas)

    Rust GitHub. This took me much longer that I care to admit. I started with a tree-based solution, tried a list, went back to tree and the back to the list again...

  113. adventofcode

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

  114. AOC2021

    My solutions to AOC 2021 (by EfficientBogoSort)

    Python 3

  115. aoc

    my solutions to Advent of Code puzzles (by MarcoLucidi01)

  116. adventofcode

    Solutions to Advent of Code in Go (by 1e9y)

  117. advent-of-code

    My Advent of Code solutions (by premun)

  118. AOCSnailMath

    Advent of code snail math solution Gambas3

  119. advent-of-code-2021

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

  120. Advent-of-Code

    My solutions for the Advent of Code puzzles (work in progress). (by tbpaolini)

    Bonus: Helper function to build the binary tree

  121. Advent-of-Code-2021

    GitHub

  122. AdventOfCode_2021

    My Solutions to the Advent of Code 2021 (by HansBambel)

    I managed after a very long time to solve it with a class structure. Not the nicest code, but it was a lot of fun. Also visualizing and scribbling multiple trees was definitely needed and also a lot of fun. Here's my code

  123. aoc-2021

    Great solution. I was tired and stuck today so I decided to skimp and well, let's say let your solution inspire me. I did make one change though - using the experimental box pattern feature, it is possible to get around some of the matching gore in `explode`. In case you are interested, here's the commit with only those changes: https://github.com/barafael/aoc-2021/commit/049ae76a3493cfa7d7813d3e057c0e06c09cc90f

  124. AdventOfCode2021.jl

    Advent of Code 2021 in Julia

  125. advent-of-code

    I spent a long time on this on Sunday but really enjoyed it. I've linked the code for the day above but I've split off the library functions into my general AoC repository, they're in zipper.lisp maybe.lisp and a couple of functions in monad.lisp.

  126. adventofcode

    My collection of Advent of Code solutions in a slightly overkill project setup πŸ™ƒπŸ‘» (by marcelblijleven)

    My solution for today: https://github.com/marcelblijleven/adventofcode/blob/master/src/adventofcode/year_2021/day_18_2021.py

  127. advent-of-code-go

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

  128. adventofcode-2021

  129. AdventOfCode2021

  130. advent-of-code

    Collection of JS solutions for puzzles from adventofcode.com πŸŽπŸŽ„ (by romellem)

    Otherwise, the main way I solved this was with a flat list of tokens rather than a truly nested structure. This was very similar to last year's Day 18, which I also solved in a similar manner.

  131. advent-of-code-2021

    My Advent of Code solutions. I prioritize readability over performance where possible. (by elliott-with-the-longest-name-on-github)

  132. advent-of-code-2021

    Advent of Code 2021 Solutions (by jerchende)

    Parsed the input into an object tree. Wrote a lot of tests.

  133. advent-of-code

    My solutions for Advent of Code (by Apreche)

  134. aoc-clojure

    Advent of code 2020 solutions in Clojure

  135. aoc2021

    Advent of Code 2021 Solutions (by nlowe)

    Go, 19196/19041

  136. aoc-2021-in-kotlin

  137. advent_of_code_2021

    Golang solutions to advent of code 2021 (by Stefansfrank)

    I am pretty satisfied with my solution to this problem even though there is some optimization potential left on the table - it solves the puzzle in 500 ms on my MB pro.

  138. advent-of-code

    Advent of code solutions (by tallbikeguy)

  139. Advent_Of_Code

    My own solutions for http://adventofcode.com (by VSZM)

    Solution

  140. advent2021

    Advent of Code 2021: This Time It's Go Time (by Resisty)

    Golang: https://github.com/Resisty/advent2021/blob/main/cmd/day18/day18.go

  141. advent-of-code-kotlin-2021

    Advent of Code 2021 Challenge (by PhenixFine)

    Kotlin - I went with solving it in place ( sort of, I had to replace [ ] with ( ) because of the way I stored the numbers ). My first day attempt of it I tried to do it with binary tree, but I'm just not familiar enough with the subject to do it that way and I failed miserably ( I'm studying the subject now, as I think it will be helpful with future code challenges ). So my next day attempt I figured I'd try solving it in place and everything worked out really well ( solved it yesterday, but wanted today to review my code before submitting it ).

  142. advent-of-code

    Synergy Codes' developers and their attempts to solve "Advent of Code" riddles (by synergycodes)

    Full code

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

  • -πŸŽ„- 2021 Day 20 Solutions -πŸŽ„-

    98 projects | /r/adventofcode | 19 Dec 2021
  • -πŸŽ„- 2021 Day 21 Solutions -πŸŽ„-

    94 projects | /r/adventofcode | 20 Dec 2021
  • -πŸŽ„- 2021 Day 11 Solutions -πŸŽ„-

    177 projects | /r/adventofcode | 10 Dec 2021
  • -πŸŽ„- 2021 Day 3 Solutions -πŸŽ„-

    230 projects | /r/adventofcode | 2 Dec 2021
  • [2022] [Angular / Typescript] Collection of all visualizations I created this year as an interactive website

    2 projects | /r/adventofcode | 28 Dec 2022

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