-🎄- 2022 Day 16 Solutions -🎄-

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

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

    Advent of Code (by ramuuns)

  2. 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
  3. adventofcode

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

    TypeScript - Under 500ms both parts (test + input), I have to look for ideas for Part 2, looked at multiple Python solutions and just ported them to TypeScript and improved.

  4. advent-of-code-2022

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

  5. Advent-of-Code

    A repository holding all of my solutions to Advent of Code problems (by Noble-Mushtak)

    Python 3 (to process the input) and C++ (to actually solve the problem), 81/143, view code here

  6. advent-of-code

    Coding Solutions for Advent of Code (by cs-cordero)

  7. AdventOfCode

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

    C++, 41/412. Video. Code. My C++ code runs in about 70 seconds (for both parts).

  8. adventofcode

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

    My Scala solution, not yet cleaned up at all.

  9. 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
  10. aoc2022

    Github

  11. AOC2022

    Here's my code but idk if anyone will be able to make sense of it: https://github.com/dclamage/AOC2022/blob/main/day16/src/main.rs

  12. adventofcode

    My mostly Python solutions to advent of code (by emanivinay)

    Python 3

  13. AdventOfCode2022

    Solutions to Advent of Code 2022 challenges (by carrdelling)

    Part 1 is just a careful DFS implemented iteratively (no recursion), using (time, location, valves_opened) => score as a criteria to check if it is worth to explore a state or not. At every state, I add a new branch if we can open a valve in the current location AND one new branch for every possible new valve to visit.

  14. advent-of-code-2022

    Solutions to AoC 2022 in zig (by fjebaker)

    Zig

  15. advent-of-code

    advent of code (by fridokus)

    Python my ugliest solution this year! Kill me 🤮

  16. adventofcode

    Main code, and the previously written A* algorithm. (Sorry the latter code only have Traditional Chinese comments, but other than some template magic the code should be fairly easy to follow.)

  17. aoc22

    advent of code 2022 | typescript (by illkle)

    https://github.com/ze-kel/aoc22/blob/main/src/16/index.ts Brute-force with several optimizations:

  18. AdventOfCode2022

    [Source on GitHub](https://github.com/ckainz11/AdventOfCode2022/blob/main/src/main/kotlin/days/day16/Day16.kt)

  19. adventofcode2022

    Python, random exploration: https://github.com/supermouette/adventofcode2022/blob/main/day16/p2.py

  20. advent-of-code-2022

    Python. less then 2s for the both of them.

  21. advent-of-code-2022

    Advent of Code 2022 solutions in Ruby (https://adventofcode.com/2022) (by damyvv)

    The code is horrible, but performance is great. The basic idea of the algorithm is to consider all the valves we can move to. We compute how long it will take to move to a valve, and we also precompute how much pressure will be released in total by this valve using the remaining time. Then, if there are paths that have an equal distance, we only have to consider the path that has the highest potential pressure release. This drastically reduces the iterations needed, hence the low runtime. Also, the distances are not precomputed, but they are cached. This is more efficient, since we don't need all paths (for example we can skip all paths that have 0 flow rate, as we will never move to them, only pass them).

  22. personal_code

    random code that I have lying around

    here's my part 2, which runs in 2 seconds.

  23. adventofcode

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

  24. advent-of-code

    advent of code solutions (by messcheg)

    Made my solution in C# (https://github.com/messcheg/advent-of-code/tree/main/AdventOfCode2022/Day16) Took me a lot of time to make solution for part I (due to the fact that it's early in the morning here and I need to finish before the other life in my house starts..). But I spent only half-an-hour, to get the answer for part II. (Rank 3675 after part I, rank 1797 after part II).

  25. advent-of-code

    Solution

  26. aoc2022

  27. aoc2022

    third time's the charm (by filbertphang)

    solutions can be found here: https://github.com/filbertphang/aoc2022/tree/main/day16

  28. AdventOfCode

    Advent of code daily challenge (by WilliamLP)

    There's nothing particularly nice about my Python solution but in case anyone's interested here it is. I find all points' shortest paths using floodfill and a loop because I couldn't recall Floyd-Warshall. And then it's a DFS, branching every turn when the human or elephant can make a choice to move to another valve and open it. Debugging was tricky.

  29. aoc2021

    Advent of Code 2021 - 2023 (by dirk527)

  30. advent-of-code-2022

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

    Both parts in 28 lines of Python. It runs in 720ms on PyPy.

  31. AoC-2022-python-solutions

    advent of code 2022 solutions

    this solution, by intention, does not work for all testcases, but it worked for mine:

  32. Advent_of_Code

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

  33. advent-of-code-2022

  34. advent-of-code-2022

    Advent of Code 2022 (by jerchende)

    Java

  35. advent_of_code_2022

    Rust

  36. advent-of-code

    My solutions for Advent of Code 2022, 2023 and 2024 (by Gobbel2000)

    Part 2 28s

  37. adventofcode

    my solutions to advent of code (by Joald)

    link

  38. adventofcode

    Advent of code solutions (by mathsaey)

  39. advent-of-code

    My solutions to Advent of Code :) (by ndepaola)

    python: https://github.com/ndepaola/advent-of-code/blob/main/years/2022/16/2022_day_16.py

  40. aoc-2022

    Not proud of this one!

  41. advent-of-code-2022

    Solutions to Advent of Code 2022 puzzles https://adventofcode.com/2022 (by Lysander6)

    Rust🦀: github (I would personally advise against checking it out 😛)

  42. advent-of-code

  43. advent-of-code

    JavaScript

  44. aoc-2022

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

  45. adventofcode

    My attempt at the Advent of Code (by korylprince)

    Go

  46. advent_of_code_2022

    Kotlin solutions to the Advent of Code 2022 puzzles (by Stefansfrank)

    Kotlin - runs in 4 sec for both parts on my decently fast MBPro - Link

  47. advent-of-code

  48. aoc_2022

  49. adventofcode

    Advent of Code challenge solutions (by flwyd)

    Elixir, 4089/9363 (4.75 hours and 25 hours), code

  50. aoc2022

    My Advent of Code 2022 solutions! (by sourishsharma17)

  51. advent-of-code

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

  52. advent-of-code-2022-rust

  53. a2tools

    Stuff I write for my Apple //c

    I'm stopping at part 1 because I guess part 2 would take days even if I figure out a good algorithm. Here's the code.

  54. advent-of-code-2022

    Advent of Code solutions in Racket! (by I-mikan-I)

    I initially solved part 1 and two by implementing a branch&bound/dynamic programming solution in Racket (GitHub).

  55. advent-of-code-2022

    My solutions for the https://adventofcode.com puzzles (2022) 🎄🎅 (by ClouddJR)

    [GitHub](https://github.com/ClouddJR/advent-of-code-2022/blob/main/src/main/kotlin/com/clouddjr/advent2022/Day16.kt)

  56. advent-of-code-2022

    advent of code 2022 (by janiorca)

  57. AdventOfCode2022

    Rust project for advent of code 2022: https://adventofcode.com/2022 (by Convez)

    This solution works on the test data, but for actual data it's giving me a higher number. My function is trying to find the highest possible score, and at each recursive level I remove the current item to the eligible nodes, I'm not sure if there is something wrong with my exit condition or my score calculation: https://github.com/Convez/AdventOfCode2022/blob/main/day16/src/main.rs

  58. Advent-Of-Code-2022

    Kotlin repository for tracking progress in the Advent of Code challenges. (by SnyderConsulting)

    Github

  59. advent-of-code-julia

    I used your solution and implement it in Julia. It takes 58.756 ms for part 1 and 60.697 ms for part 2.

  60. aoc2022_clj

    Advent of Code 2022 in Clojure

    Haven't seen any Clojure solutions so I'll post mine (GitHub), but it's not very good.

  61. advent-2022

    advent of code 2022 (by jstanley0)

    C++

  62. advent-of-code-2022

    Part 1 - ~5 seconds runtime Do a DFS style search of the possible solutions / orders to visit the valves in, but only consider the valves with non-zero flow rate, keeping track of the time each valve was opened. The travel time in between each valve we stopped at was the length of the shortest path between them (which I memoized as I went rather than pre-computing). Abandoning a "branch" of the search once you hit the time limit dramatically sped things up.

  63. AdventOfCode2022

    THe code is here https://github.com/JackMcBride98/AdventOfCode2022/blob/main/Day16/solution.js

  64. advent2022

    Bit late to the part. php solution , 16a in 60ms, 16b in 40ms.

  65. aoc2022

    Advent of Code 2022 - my answers

  66. advent-of-code

  67. aoc2022

    My Advent of Code 2022 solutions, in Rust. (by orlp)

  68. AdventOfCode

    Collection of my solutions for Advent of Code 2022 (by frhel)

    JavaScript of all things...

  69. 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
  • Apple hiring compiler developers for improving Swift / C++ interoperability

    4 projects | news.ycombinator.com | 13 Jan 2024
  • [All years, all days][C#.NET] Joined the 400 stars club!

    6 projects | /r/adventofcode | 5 May 2023
  • What is the best way to learn Rust for offensive cybersecurity?

    3 projects | /r/redteamsec | 24 Apr 2023
  • [AoC 2022] - Performance of the solutions for day 8

    4 projects | /r/learnrust | 12 Mar 2023

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