-
-
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.
-
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.
-
-
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
-
-
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).
-
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.
-
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.
-
Github
-
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
-
Python 3
-
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.
-
Zig
-
Python my ugliest solution this year! Kill me 🤮
-
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.)
-
https://github.com/ze-kel/aoc22/blob/main/src/16/index.ts Brute-force with several optimizations:
-
[Source on GitHub](https://github.com/ckainz11/AdventOfCode2022/blob/main/src/main/kotlin/days/day16/Day16.kt)
-
Python, random exploration: https://github.com/supermouette/adventofcode2022/blob/main/day16/p2.py
-
Python. less then 2s for the both of them.
-
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).
-
here's my part 2, which runs in 2 seconds.
-
-
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).
-
Solution
-
solutions can be found here: https://github.com/filbertphang/aoc2022/tree/main/day16
-
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.
-
-
Both parts in 28 lines of Python. It runs in 720ms on PyPy.
-
this solution, by intention, does not work for all testcases, but it worked for mine:
-
Advent_of_Code
A repo revolving around attempting to solve the Advent of Code puzzles with single-statement t-sql (by adimcohen)
-
Java
-
Rust
-
Part 2 28s
-
link
-
-
python: https://github.com/ndepaola/advent-of-code/blob/main/years/2022/16/2022_day_16.py
-
Not proud of this one!
-
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 😛)
-
JavaScript
-
-
Go
-
Kotlin - runs in 4 sec for both parts on my decently fast MBPro - Link
-
Elixir, 4089/9363 (4.75 hours and 25 hours), code
-
-
-
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.
-
I initially solved part 1 and two by implementing a branch&bound/dynamic programming solution in Racket (GitHub).
-
[GitHub](https://github.com/ClouddJR/advent-of-code-2022/blob/main/src/main/kotlin/com/clouddjr/advent2022/Day16.kt)
-
-
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
-
Advent-Of-Code-2022
Kotlin repository for tracking progress in the Advent of Code challenges. (by SnyderConsulting)
Github
-
I used your solution and implement it in Julia. It takes 58.756 ms for part 1 and 60.697 ms for part 2.
-
Haven't seen any Clojure solutions so I'll post mine (GitHub), but it's not very good.
-
C++
-
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.
-
THe code is here https://github.com/JackMcBride98/AdventOfCode2022/blob/main/Day16/solution.js
-
Bit late to the part. php solution , 16a in 60ms, 16b in 40ms.
-
-
-
JavaScript of all things...
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives