-๐ŸŽ„- 2021 Day 14 Solutions -๐ŸŽ„-

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. adventofcode

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

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. advent-of-code-solutions

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

  4. aoc2021

    Discontinued Advent of Code 2021 (by ednl)

    C code. I'm afraid I went a little overboard with double checking everything. Are there even pairs for which no rule exists? If there are, I'm good :) Runs very fast in 180 ยตs on a Pi 4 @ 1.8 GHz:

  5. advent-of-code

    I wrote this bottom-up DP solution, and it's not a dead end :)

  6. adventofcode

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

    TypeScript, no string manipulation, kept two maps, count of pairs from last step, and count of polymers, took just a counter change for part 2.

  7. adventofcode

    Advent of Code solutions (by mcpower)

    Python, 8/28. Part 1, Part 2. My part 2 turned the input into "a Counter of adjacent pairs of characters", which you need to be careful about because turning that to "a Counter of characters" is not easy - you double-count all characters except for the first and last which cost me an incorrect submission!

  8. advent-of-code

    Advent of Code (by morgoth1145)

    Python 73/287

  9. SaaSHub

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

    SaaSHub logo
  10. AdventOfCode

  11. adventofcode

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

    My Scala solution.

  12. Advent-of-Code-2021

    Advent of Code Solutions 2021 in Python (by DenverCoder1)

  13. aoc2021

  14. Solutions in C++: Part 1 Part 2

  15. AdventOfCode_2021

    Repository for Advent of Code 2021 solutions (by galenelias)

  16. AdventOfCode-Java

    adventOfCode(Language.JAVA);

  17. aoc2021rust

    Rust. Ended up doing it recursively, like last time. 4ms on part 2; pretty sure that's because I keep cloning hashmaps.

  18. aoc2021

    Advent of Code 2021 Solutions (by nlowe)

    Go 1449/3191

  19. aoc

    Advent of Code solutions in Go (by sebnyberg)

    Go (search: golang)

  20. advent-of-code-2021

    Part 1 & 2 Optimized

  21. advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  22. advent-of-code

    Perl I expected second part to make a surprise and do something different than just increase number of loops - but It didn't :)

  23. AdventOfCodePython

    Python solutions for Advent of Code puzzles 2015-24.

    Python:

  24. deno_aoc

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

  25. Advent-of-code-2021

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

  26. AOC2021

    Discontinued F# solutions to the 2021 Advent of Code challenges (by nicklecompte)

    Some F# since it's pretty underrepresented: https://github.com/nicklecompte/AOC2021/blob/main/AOC2021/Day14.fsx

  27. advent-of-code-2021

    AOC 2021 (by timfennis)

  28. advent-of-code

    Common Lisp. Pretty bad day, stumbled around for like an hour trying to actually construct the strings for part B and then finished in like 10 mins once I realized how to take the better approach :/

  29. advent-of-code-2021

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

  30. Kotlin

  31. advent_of_code_2021

    It's a simple iteration in yours, I like it. I complicated things by recursing and maintaining letter counts the entire time.

  32. AdventOfCodeCSharp

    My AoC Solutions

  33. AoC2021

    Advent of Code 2021 in F# (by kimvais)

    In the end it turned out pretty nice

  34. advent-of-code-2021

    My solutions for the https://adventofcode.com puzzles (2021) ๐ŸŽ„๐ŸŽ… (by ClouddJR)

    All solutions

  35. aoc2021

    Advent of Code 2021 (by UnicycleBloke)

  36. aoc2021

    Advent of Code 2021 - my answers

    Kotlin, Python, and Rust are all following the same pattern.

  37. AdventOfCode2021

  38. advent_of_code_2021

    Rust solution

  39. advent-of-code-2021

  40. AoC2021

    Advent of Code 2021 (by gereons)

  41. aoc2021

    python

  42. AdventOfCode2021

    Cleaned up code: [email protected]

  43. AdventOfCode2021

    Solutions for Advent Of Code (by MichelBillaud)

  44. AdventOfCode2021

    C#

  45. aoc-2021-fsharp

    My F# solutions for Advent of Code 2021 https://adventofcode.com/2021

    F# https://github.com/bainewedlock/aoc-2021-fsharp/blob/master/aoc-2021-14/Solution.fs

  46. adventofcode-21

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

    For first part implemented the task logic actually calculating the polymer each iteration. This was slow enough for part 2 so had to scratch my head for a while.

  47. AdventOfCode_2021

    Repo for the 2021 edition of www.adventofcode.com (by LubosKolouch)

  48. Advent-of-Code-2021

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

    I'm not sure what kind of brainfog descended on me this morning. After part 1 I instantly knew I should just count the pairs and update their numbers but somehow couldn't figure out how to do it. It took me almost an hour before it dawned on me that...wait for it...a pair splits into two pairs. After that and some off-by-one debugging I came up with this solution. Defaultdict for the win.

  49. aoc2021

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

    Elixir

  50. adventofcode

    adventofcode.com solutions (by linl33)

  51. AdventOfCodeHaskell

    Advent of Code in Haskell

  52. Advent_of_Code_2021

    My solutions to Advent of Code 2021 (by neelakantankk)

    Python

  53. adventofcode

    Advent of code solutions (by mathsaey)

  54. Advent-of-Code

    bad christmas spaghett (by YelovSK)

    GitHub link - keeping track of pair counts and character occurences.

  55. advent_of_code_2021

    I had the same approach. A bit different details in the end (double counting yadda yadda). Here is my code!

  56. AdventOfCode

  57. advent-of-code-2021

    ๐Ÿฆ€ Rust solutions to AoC 2021 (by wfxr)

    Optimized Rust Solution

  58. advent-of-code-2021

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

  59. aoc-2021

    Discontinued Advent of Code 2021 [Moved to: https://github.com/TenViki/advent-of-code] (by TenViki)

    Part 1 of course generating all the strings Part 2 reworked :D Visualization here: https://www.reddit.com/r/adventofcode/comments/rg5h8e/2021_day_14_visualization_with_a_chart/ Source code for both parts: https://github.com/TenViki/aoc-2021/tree/main/14

  60. advent-of-code-2021

    zig solutions to advent of code 2021 (by jchevertonwynne)

  61. aoc2021

    Advent of code 2021 (by oleg-prikhodko)

    My solution in javascript

  62. aoc2021

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

  63. sea

    Discontinued Sketches (by nuoxoxo)

    C++\ Part 1 was brute forced at the beginning. Both parts were rewritten to get part 2.\ I think the lesson is to think DP-wise right away as soon as you notice the structure gets bigger real quick

  64. advent-of-code

    My contribution to the Advent of Code (by yalit)

    My solution here : in typeScript (a bit too verbose... but hey, it's working :D)

  65. Advent-of-Code

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

    Python 3.10 (source with docstrings)

  66. AdventOfCode2021

    My solutions for AdventOfCode 2021 (by FluffyGameDev)

    My C++ Solution

  67. advent-of-code

    In Common Lisp (by brunal)

  68. adventofcode

    Advent of code solutions (by julian-west)

    Python day 14 solution (GitHub). Tried splitting out the logic into individual functions to aid readability.

  69. aoc2021

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

  70. Advent-of-code

    My solutions of adventofcode.com (by MichalMarsalek)

    using my templates.

  71. AOC2021

    advent of code 2021 (by zalazalaza)

    < 30 lines of python

  72. advent-of-code-2021

    AOC in go (by alextanhongpin)

  73. adventofcode

    Answers to Advent of Code (by viceroypenguin)

  74. advent-of-code

    Advent of Code puzzles (by KT421)

  75. advent-of-code

    My solutions to the Advent of Code (by aaronreidsmith)

    Scala. Would have been a lot easier in Python with a proper Counter class. This isn't super idiomatic (i.e., functional) Scala, but it gets the job done

  76. Advent_of_Code2021

    Solutions to Advent of COde 2021 (by cettt)

    cleaned up my code a little. Both parts run in 40ms. Full code with comments is on github

  77. adventofcode

    Advent Of Code (by urvil38)

  78. Advent-of-Code-2021

    GitHub/Polymerizator.java

  79. aoc

    Advent of code solutions (by tglane)

    Rust First time working with Rust on this years challange so its probably not idiomatic but im trying to get more comfortable with it. Feedback is welcome

  80. advent-of-code

    Advent of code solutions (by rbusquet)

  81. Advent-of-Code-2021

    Advent of Code 2021 solutions in Matlab (by j-a-martins)

    GitHub [Source w/ comments] [Execution profile for 40 steps]

  82. AdventOfCode

    Advent of code daily challenge (by WilliamLP)

  83. aoc

    Advent of Code Solutions (by joeyemerson)

  84. advent-of-code-2021

    Rust solutions of Advent of Code 2021 (by MrRobb)

    Rust: Solution

  85. adventofcode2021

    Python 3.10 solutions, standard library only

  86. aoc-2021

    Advent of Code 2021 with C#/LINQ (by jasonincanada)

    C# solution, I keep letter pair counts in a square grid and a separate map for individual letter counts

  87. AdventOfCode

    repo

  88. Advent-of-Code

    Advent of Code (by michaeljgallagher)

    Tricky memoization / dp problem today

  89. AdventOfCode2021

  90. advent-of-code

    Solving Advent of Code (by pemoreau)

    My solution in Go

  91. advent_of_code

    All of my :star: Advent of Code solutions - using Elixir (by wasi0013)

    y2021/day_14.ex

  92. AOC2021

    Quick n dirty C# (by oflahero)

    C#. 15ms avg for part 2. Insight is to maintain a single letter frequency count AND a letter pair frequency count.

  93. advent-2021

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

  94. aoc2021

    Solutions for Advent of Code 2021 (by arturhoo)

  95. advent-of-code-2021

  96. adventofcode

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

  97. AdventOfCode

    C# source P2 Runs in about 800 us avg. Using a tokenized dictionary after I ran out of memory once building strings. The lanternfish strikes back

  98. adventofcode

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

  99. AdventOfCode

  100. adventofcode

  101. advent-of-code

    My personal Advent of Code solutions (by 770grappenmaker)

  102. aoc-2021

    Advent of Code (AoC) 2021 solutions (by egel-lang)

    Egel, the element count is just either the sum of all (_,B) counts plus 1 for the head of the template, or the sum of all (A,_) counts plus 1 for last of the template. Just project on either the first or the second element.

  103. AOCday14

    solution for Advent of code, day 14, 2021

  104. advent-of-code

    Advent Of Code Solutions (by sreedevk)

  105. advent-of-code-2021

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

  106. advent-of-code-2021

    Advent of Code 2021 (by cylab)

  107. aoc-2021

    Advent of Code 2021 (by zookini)

  108. aoc

  109. advent-of-code

    My Advent of Code submissions (by DecemberDream)

    Python day 14 where part 2 is a bit messy but it seems to be very efficient.

  110. aoc-2021-in-kotlin

  111. aoc2021

  112. aoc2021

    Advent of code 2021 in Kotlin! (by crnkofe)

  113. advent-of-code

    This was a bit difficult. My original part one solution worked completely differently to what I had to do for part two.

  114. advent-of-code

    Advent of code solutions (by tallbikeguy)

  115. AdventOfCode2021

    Advent of code 2021 (by marcodelmastro)

  116. adventOfCode2021

    Github Link

  117. advent-of-code

    My Advent of Code solutions (by sk1talets)

    Node.js solution

  118. AOC2021

  119. coding_challenges

    Various Coding challenges with my solutions (by BigPeet)

    Package with everything

  120. aoc-typescript

  121. AdventOfCode

    My solutions to Advent of Code (by DanaL)

    C# code on github

  122. Advent-of-code-2021

    C solutions to AoC 2021 (by rprtr258)

    C solution.

  123. adventofcode

    Discontinued My solutions to the Advent of Code challenges (by djotaku)

    Compare my part 1 answer to see what I mean.

  124. advent-of-code-2021

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

    See solution: https://github.com/tcc-sejohnson/advent-of-code-2021/tree/main/14

  125. AdventOfCode2021.jl

    Advent of Code 2021 in Julia

  126. AoC2021

    Advent of Code 2021 in GO (by HalfInner)

  127. advent-of-code

    A repository for all my advent of code solutions (by jcreek)

    This is literal witchcraft to me! How on earth did you get this to run instantly for 40 steps when mine essentially just uses a linkedlist instead of a dictionary and takes hundreds, if not thousands of hours and TBs of RAM to run? https://github.com/jcreek/advent-of-code/blob/master/2021/14/Program.cs

  128. AdventOfCode2021

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

    C# Github Part two took me some head scratching, got to one off the right answer but ended up needing a pointer from the sub for the trick of initializing the element count and counting additions only. Also I had spoilers before this that part two would be ridiculous after all the lantern fish memes, but I felt I should do the brute force approach for part 1 anyway.

  129. advent-of-code-2021

  130. AdventofCode2021

  131. advent-of-code-2021

    Discontinued Trying to solve https://adventofcode.com/ [Moved to: https://github.com/ThePituLegend/advent-of-code] (by ThePituLegend)

    I was stuck on the counting part (after being stuck in the How should I solve the massive string being massive? part hahaha). So I finally came here for some hints, and found your code. And this comment saved the day: # The only new character we've added to the overall string is the new # added element. The quantity is the same as the pair that generated it # For example, 25 ABs will generate 25 new Cs if the rule is AB -> C Actually I'm kinda scary because our codes are fairly similar :p There's some simplifications/contractions/tricks maybe you'll benefit from (even though my code is far from perfect in its tricks): https://github.com/ThePituLegend/advent-of-code-2021/tree/main/day14

  132. aoc_solutions

    Ruby solution optimized (~8ms to print both parts) by precomputing 41,000 values

  133. advent

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

  134. AdventOfCode

    Python

  135. adventofcode

    Advent of Code! https://adventofcode.com/ (by dfontana)

    Rust in ~600us

  136. advent-of-code

    Solutions for Advent of Code, in TypeScript. (by Awjin)

    Github source, with documentation. I solved this using a level-order traversal of the graph of inserted polymers.

  137. advent-of-code-2021

    Rust

  138. advent_of_code

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

    Below is the new solution, which works for part 1 and 2. The full code is on GitHub.

  139. AdventOfCode2021

  140. aoc-2021-clj

    Clojure, source and tests. Brute forced part 1 but refined the solution for part 2 which runs in about 30ms (not bad, I'd say!).

  141. AdventOfCode2021

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

  142. CodingExercises

    A variety of coding exercises for practice and to learn new languages

    Part 1 (Rust) - pretty simple.

  143. A bit late, but I got there in the end. Using the same "counting pairs" trick as everyone else. Writeup on my blog and code on Gitlab.

  144. aoc

    Python, with imports of any library. Part 1, inefficient and slow. Part 2 using try/except statements and pair counting, quite fast I find it.

  145. Advent_of_Code

    My Advent of Code solutions. (by Farbfetzen)

    My Solution in Python. This one is pretty compact and amazingly fast thanks to collections.Counter and functools.lru_cache. Here is the function for counting the elements:

  146. AoC2021_0

    Advent of Code 2021

    Golang Part 1 using brute force Part 2 using memoization

  147. AdventOfCode2021

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

  148. advent-of-code-go

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

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

  • Perl ๐Ÿช Weekly #702 - Perl Camel

    3 projects | dev.to | 6 Jan 2025
  • Advent of Code 2024

    24 projects | news.ycombinator.com | 1 Dec 2024
  • [2023] A list of solutions for this year and years past

    1 project | /r/adventofcode | 1 Dec 2023
  • [2022 day 19] after trying ever day for the last 11 days, nothing seems to work

    3 projects | /r/adventofcode | 31 Dec 2022
  • -๐ŸŽ„- 2022 Day 18 Solutions -๐ŸŽ„-

    74 projects | /r/adventofcode | 17 Dec 2022

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