-๐ŸŽ„- 2022 Day 12 Solutions -๐ŸŽ„-

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • aoc2022

    My solutions for Advent of Code 2022 (by tumdum)

  • Rust solution. Part 2 is just loop over all places with a and execution of part1 algo. At least it's not that slow thanks to sharing of data between runs. Recordings twitch, youtube.

  • AoC

    my personal repo for the advent of code yearly challenge (by Fadi88)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • aoc2022

  • You can even take that one step further and calculate all paths to as in one go. My Python implementation of that runs in < 10 ms, C++ is at 20 ยตs.

  • aoc2022

    Discontinued Advent of Code 2022 (by ednl)

  • Full source code Straightforward BFS with a simple own implementation of a queue. Only clever bit was to simply use End as the start position for part 2 and change the finish condition:

  • advent-of-code

    For sharing my adventofcode.com solutions (by kbielefe)

  • I wrote an immutable A* in Scala a few years ago. It's not too bad if you have immutable hash maps and an immutable priority queue. Comes in handy for a lot of puzzles.

  • adventofcode

  • GitHub

  • advent-of-code

    My solutions for Advent of Code (all years!) (by nthistle)

  • Python, 23/29. Video coming soon, original code, marginally cleaner code that has the nicer version of part 2.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • AdventOfCode

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

  • Python3, 75/41. Wrote my BFS from scratch! Video coming soon. Code.

  • AlgorithmProblems

    Solutions to Algorithm Problems :chart_with_upwards_trend: :neckbeard:

  • github link

  • advent-of-code

    Advent of Code (by morgoth1145)

  • Python 3 119/160

  • Advent-of-Code

    Advent of Code (by michaeljgallagher)

  • 195/242

  • advent-of-code-2022

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

  • adventofcode

    Answers to Advent of Code (by viceroypenguin)

  • adventofcode

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

  • My Scala solution.

  • advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  • AdventOfCode

    Hacky solutions for [Advent of Code](https://adventofcode.com), working on past problems (by AllanTaylor314)

  • Python [1881/1740]

  • aoc2022

  • advent-of-code

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

  • aoc-2022

    Solutions to the Advent of Code 2022, just for fun ๐Ÿ™ˆ (by parthematics)

  • Simple Python BFS: https://github.com/parthematics/aoc-2022/blob/master/day12/day12.py

  • advent_of_code

    This repository contains solutions to each of the problems in Advent of Code 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in C++ (and 2020 in Python as well)

  • Part 2 (Each file is a self-contained solution)

  • AdventOfCode

  • advent-of-code

    Advent of Code! (by peckb1)

  • Kotlin Day 12 Dijkstra Day!

  • AdventOfCodeCSharp

    My AoC Solutions

  • C#/Csharp: Code here

  • advent-of-code

  • AdventOfCode2022

    My solutions to the Advent of Code challenges from 2022. (by MatthewWest)

  • aoc-2022

    Code for Advent of Code 2022 (by akleemans)

  • Compiled Python (with codon): Github

  • toybox

  • GitHub commit Part 2 solution visualization

  • oops, yea sorry i forgot that i use a header file here. This one https://github.com/sleepntsheep/advent-of-code-2022/blob/main/a.h

  • Advent-Of-Code

    Advent of Code Solutions (by spenpal)

  • Python (Link to Part 1 & 2)

  • advent-of-code-2022

  • Python

  • aoc2022

    ๐ŸŽ„ (by jenarvaezg)

  • advent-of-code

  • Part 1: a simple BFS

  • advent-of-code-julia

  • Julia

  • advent-2022

  • Well, nuts. In Part 1, I decided I'd put in the extra effort to implement A*, since it's more efficient than Dijkstra's algorithm. I thought this would set me up nicely for Part 2. It did not.

  • adventofcode

    Advent of Code challenge solutions (by flwyd)

  • Elixir 3853/3602, code, reflections

  • hatchery

    Various incubating projects that i lay on to keep warm (by quat1024)

  • rust. hashset party. I spent some time tinkering with it and like it a lot actually.

  • adventofcode

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

  • aoc2022

  • aoc

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

  • Perl - my implementation for part 2.

  • AdventOfCode

    Hacky solutions for lovely problems (by skarlman)

  • Advent_Of_Code

    My solution for the Advent of Code challenges in various languages. (by Dullstar)

  • Comes with a free simple visualization of path lengths because I made it for debugging purposes and I thought it was actually pretty interesting. The end point has a value of 000, and you can follow the path there from anywhere on the map by going to a space with the next lowest number, i.e. starting at 010 -> 009 -> 008 -> 007... etc. Spaces with --- cannot reach the end point.

  • AdventOfCode2022

    Advent of Code Solutions (by panosprotopapas)

  • If anyone's interested for a solution using Neo4j -> GitHub

  • aoc

    Advent of Code (by ramuuns)

  • AdventOfCode2022

  • Rust

  • aoc2022

    Advent of Code 2022 - my answers

  • aoc2022

  • advent-of-code

  • This solution in Perl 5 provides an ASCII animation in your terminal as it finds the solution. You need a fairly wide terminal for it to work. (The input map is 64 cells wide and the output uses 3 characters per cell, so you'll need a terminal width of at least 64ร—3 = 192 characters.)

  • AdventOfCode2022

  • aoc2022

    My submissions to Advent of Code 2022. Learning Julia for the first time. (by hraftery)

  • Julia

  • Graphs.jl

    An optimized graphs package for the Julia programming language

  • Getting started with Graph libraries is always a great way to get a feel for the approachability of a language ecosystem. Got thrown in a web dead-end by some links to old libraries, but once I found Graphs.jl it was pretty smooth sailing. The precious examples were sufficient if not bountiful, but I appreciate examples are hard for such generic libraries.

  • AdventOfCode

    Advent of Code repo & framework (by EricEzaM)

  • Github

  • AOC2022

    Advent of Code 2022, solved in Haskell (by MatthiasCoppens)

  • Haskell, 40 ms. I represented the grid as a map (type Grid = M.Map Coord Height) and made the height an Enum instance (data Height = Start | Height Char | End). I think I used Dijkstra?

  • adventofcode

    adventofcode.com solutions (by linl33)

  • aoc-2022-kotlin

    AOC 2022 in Kotlin!

  • AdventOfCode2022

  • [Github]

  • adventofcode

  • Advent2022

    My take at the Advent of code 2022 while learning Haskell (by Hugal31)

  • Haskell

  • aoc2022

    Trying to solve Advent of Code 2022 in 25 different languages (1 day = 1 language) (by GoldsteinE)

  • AdventOfCode2022

  • aoc-go

    A Golang tool for generating code for Advent of Code

  • advent-of-code

  • Part one

  • go_advent_of_code

    Advent of code solution in Go

  • Day12/2022

  • advent-of-code

    My solutions to the Advent of Code (by aaronreidsmith)

  • Scala using jgrapht. I thought part 2 would require a different graph (similar to 2018 day 22) since the story said "to avoid needing to get out your climbing gear..." Glad that wasn't the case!

  • coding-problems

    Solutions to the coding problems I did. (by lightwastak3n)

  • Anyways here's the very messy original code

  • advent-of-code

    Advent of Code Solutions (by dan144)

  • Code on GitHub

  • advent-of-code-2022

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

  • 26 lines of Python for both parts. Used BFS.

  • aoc2022

    Advent of Code, this time in Deno (by danvk)

  • aoc

  • Advent-of-Code

    A collection of my solutions for "Advent of Code" (by Nuhser)

  • Although I wrote my own library for A*, dijkstra, bfs and dfs, I usually write bfs from scratch which I did part 1.

  • aoc2022

    My solutions for Advent of Code 2022 problems written in Haskell (by ehllie)

  • I wrote Dijkstra with Haskell for this one

  • adventofcode

    Advent of code solutions (by mathsaey)

  • advent-of-code

  • ๐Ÿฆ€๐Ÿฆ€๐Ÿฆ€ RUST ๐Ÿฆ€๐Ÿฆ€๐Ÿฆ€

  • advent-2022

  • You could simplify benchmarking by using the criterion library. Example

  • advent-of-code

    Advent of code (by rlemaitre-ledger)

  • Scala 3

  • aoc2022

  • adventofcode

  • aocaml

    AoC in OCaml, for maximum typing pleasure

  • a2tools

    Stuff I write for my Apple //c

  • Hardest part was implementing the actual algorithm, but it was quite fun. Fun part was trying to it cleanly using a slist implementation made especially for the occasion, see that the nice program with nice data structures couldn't even load the dataset before running out of memory, and replacing all that with int ** and char ** tables !

  • aoc2022

  • aoc2022

    My Advent of Code 2022 solutions! (by SourishS17)

  • aoc

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

  • So, a new version with a lot less almost-duplicate code @GitHub.

  • rust-mos

    Empowering everyone to build reliable and efficient software.

  • It was possible thanks to great https://llvm-mos.org/wiki/Welcome project (it adds 6502 target to LLVM). Adding 6502 support to rust was easy part :] https://github.com/mrk-its/rust-mos

  • advent_of_code_2022

    Golang solutions for Advent Of Code 2022 (by Nikscorp)

  • advent-of-code

    Noah's Advent of Code solutions (by noahtallen)

  • I implemented it with A*. For part two, I just ran A* concurrently on every coord with starting point A, which is actually very easy in Rust! (I mostly did this to learn about concurrency in Rust. It's about 4 times faster than just running A* one by one.)

  • advent-of-code-2022

    Joel Eisner's completed TypeScript code challenges for "Advent of Code" 2022 (by joeleisner)

  • https://github.com/joeleisner/advent-of-code-2022/blob/main/days/12-hill-climbing-algorithm/mod.ts (Functions)

  • advent-of-code-2022

  • Kotlin

  • AdventOfCodeHaskell

    solutions to advent of code problems (by c-coward)

  • Haskell. Recursive BFS in the State monad! Visited positions are marked with a '|' character, since this is 'z' + 2. My part 1 code didn't need too much modification for part 2, I only needed to account for the fact that adjacent 'a's can visit each other on the first step.

  • adventofcode2022

  • Dlang solution using BFS. Relevant part :

  • aoc2021

    Advent of Code 2021 - 2023 (by dirk527)

  • aoc2022-25-in-25

    Advent of Code in 25 languages

  • I'm doing 25 languages in 25 days.

  • AdventOfCodeHaskell

    Advent of Code in Haskell

  • Haskell. BFS using Data.Array for the map.

  • advent-of-code-2022

    My solutions to Advent of Code 2022. (by MrSimbax)

  • Reused my old code for pathfinding using the Dijkstra's algorithm. The code could probably be optimized specifically for the puzzle (for instance, there's no need for priority queue, and for building a more general graph structure with adjacency lists) but it's fast enough, and I wanted to use this opportunity to build a pathfinding library, as I assume pathfinding will appear again in later days.

  • aoc-2022

    Advent of Code 2022 (by Chaoste)

  • advent_of_code_2022

  • adventofcode

    My advent of code solutions - https://adventofcode.com (by pengi)

  • advents-of-code

    ๐ŸŽ„๐ŸŽ Solutions for the yearly advent of code challenges

  • AdventOfCode2022

    My solutions to Advent of Code 2022 (by willkill07)

  • Source + Header

  • advent-of-code

  • Java8

  • adventofcode2022

  • Python 3: Github

  • advent-of-code-2022

    Advent of Code solutions. (by tobyaw)

  • adventofcode

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

  • F# - This turned out better than my TypeScript solution.

  • AoC2022

    Solutions to the Advent of Code (AoC) 2022 (by gequalspisquared)

  • aoc

    One repository for all my Advent of Code solutions. (by Andrew-Foote)

  • advent-of-code

  • aoc2022

  • advent

    advent of code (by jasontconnell)

  • AdventOfCode

    My solutions to Advent of Code (by DanaL)

  • My code

  • AdventOfCode2022

    Discontinued In C11 with a pinch of GLib (by Zi0P4tch0)

  • advent-of-code-2022

  • Used an A* search today. It needs some optimising but it works https://github.com/dionysus-oss/advent-of-code-2022/tree/main/day-12

  • aoc-2022

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

  • advent-of-code

  • advent-of-code-2022

  • NetworkX

    Network Analysis in Python

  • Sure! I didn't actually use any path-finding algorithm -- I used networkx to do the pathfinding. Essentially, I created a directed graph in networkx which allowed me to model each location as a node and then place a directed edge between them if I was allowed to move from one to the next following the rules (wasn't jumping up more than one step at a time). Once I had built the map, I used the shortest_path_length command in networkx to find the shortest path and compute its length. Let me know if this makes sense or if you want more explanation!

  • adventofcode

  • adventOfCode

  • Python https://github.com/matheusstutzel/adventOfCode/blob/main/2022/12/p2.py

  • AoC2022

    Solutions to Advent of Code 2022 puzzles. (by SwampThingTom)

  • advent-of-code

    My (incomplete) solutions to the Advent of Code yearly challenges. (by Chrinkus)

  • Here's the repo for all the spaghetti goodness. Big chonkers like this one are helping to push the language balance to 35% C across all my AoC solutions.

  • AoC2022

  • Heres the Code: day12.py

  • Github Solution

  • Day 12

  • aoc-2022

    Advent of Code 2022 in Rust (by litpho)

  • advent_of_code_2022

    Advent of code 2022 (by HendrikPetertje)

  • https://github.com/HendrikPetertje/advent_of_code_2022/blob/main/test/12/day_12_test.exs CI = green too :)

  • adventofcode

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

  • Advent-of-Code

  • Swift. I tried to use GameplayKit's pathfinding, but I got fed up with it being in Objective-C and not working with subtypes properly. shortestPathSources is just an implementation of Dijkstra that works on matrices.

  • HemiprocneMystacea

    Stuff that should be in Swift and ๏ฃฟ Frameworks, but is not yet.

  • Swift. I tried to use GameplayKit's pathfinding, but I got fed up with it being in Objective-C and not working with subtypes properly. shortestPathSources is just an implementation of Dijkstra that works on matrices.

  • adventofcode

  • advent-of-code

    My advent of code solutions in C++ (by Strunzdesign)

  • aoc2022

  • Rust

  • aoc22

    Solutions for Advent of Code 2022 in Rust (by morlinbrot)

  • Here's just the interesting bit, full solution here. ``` fn dijkstra(unvisited: &mut Unvisited, start: Pos, end: Pos) -> Option { fn update_neighbor(unvisited: &mut Unvisited, cur: &Node, pos: Pos) { if let Some(neigh) = unvisited.get_mut(&(pos)) { // Steepness check. if neigh.val <= cur.val + 1 { neigh.dist = neigh.dist.min(cur.dist + 1.); } } }

  • AdventofCode

    Advent of Code (by aaftre)

  • MyAdventOfCode

  • I cloned your repo and and double checked - my input against your solution to part 1 deffo produces the same result as I mentioned above, which is apparently too low. It also produces an answer for part 2, which is 514, so maybe you were referring to this?

  • Other Notes: - My solution involved using Dijkstra's algorithm to find the shortest path. This is essentially is just BFS with the use of a Min Heap. - My CPP solution: https://github.com/rdforte/competitive-programming/blob/main/AdventOfCode/2022/Day12/q1.cpp

  • advent

    Solutions to https://adventofcode.com/ (by tsenart)

  • ~200 microseconds runtime Go solutions based on BFS that plot the path in the terminal: https://github.com/tsenart/advent/tree/master/2022/12

  • advent-of-code-2022

  • Super late to the party, here is my solution: https://github.com/xhuberdeau/advent-of-code-2022/blob/main/src/day-12/solve.ts . Idk what algorithm I used really, did it on instinct haha.

  • advent-of-code-go

    All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022

  • advent-of-code

  • Just breadth first search: https://github.com/valogonor/advent-of-code/blob/main/2022/day12.py

  • 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