-πŸŽ„- 2022 Day 9 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
  • AoC

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

  • AdventOfCode

    Hacky solutions for lovely problems (by skarlman)

  • 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
  • adventofcode

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

  • TypeScript - Under 60 lines of code, well typed, single function to solve both parts

  • advent-of-code

  • Readable Javascript solution, You can look for index.js where i solved it for the first time, compare that with solution on readable.js , readability matters

  • aoc2022

    Discontinued Advent of Code 2022 (by ednl)

  • It took me very long in part 2 to realise that I had to take one step at a time for every knot. I had built it to move Head all the way, then move Knot1 all the way to Head, then move Knot2 all the way to Knot1, etc. That this was wrong WAS visible in the result of example 2, but my method gave the same answer 36 and it had only ONE different visited location on the whole grid, which I totally missed. Gah. Source: https://github.com/ednl/aoc2022/blob/main/09.c

  • Advent-of-Code

  • I recommend SIMD2β€”it can save you a lot of reinventing the 2D wheel!

  • advent-of-code

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

  • Python, 114/34. Video coming soon, part 1 code, part 2 code.

  • 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
  • advent-of-code

    Advent of Code (by morgoth1145)

  • Anyway, this still needs more cleanup but here's cleaned up code (rather than the raw original solutions linked above).

  • adventofcode

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

  • Python, 328/89. Code for both parts

  • advent-of-code-2022

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

  • I present both a lightly cleaned up solution written while leaderboarding and a much more reasonable post-leaderboard version.

  • Advent-of-code

    My solutions of adventofcode.com (by MichalMarsalek)

  • AdventofCode2022

    My Advent of Code 2022 solutions in Kotlin (by Nohus)

  • Some premade utils came useful: Point class, Direction class, Point.move(Direction) method, and Point.getAdjacent(). Source for them here: https://github.com/Nohus/AdventofCode2022/blob/master/src/main/kotlin/utils/Geometry.kt

  • AOC

    Advent of Code baby! (by ee-4-me)

  • Github

  • adventofcode

    Answers to Advent of Code (by viceroypenguin)

  • aoc2022

  • aoc2022

    My solutions for Advent of Code 2022 (by tumdum)

  • Rust / Recording

  • Advent-of-Code-2022

  • Github link to my solution I hard coded all the possible moves for a knot in a lookup table, but I've since realized that it could have been simplified to some relatively simple logic

  • advent-of-code

    Advent of Code solutions written in Java (by zodac)

  • advent22

    Advent of Code 2022

  • Source

  • AdventOfCode2022

    Advent of code 2022 solutions (by Suicolen)

  • 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! (by peckb1)

  • Kotlin Day 09 The tail chasing a head by moving based on the result of compareTo helped trivialize this one ... rope[parentIndex + 1] = Location( x = child.x + parent.x.compareTo(child.x), y = child.y + parent.y.compareTo(child.y), ) ...

  • advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  • Advent-of-Code

    Discontinued My solutions for Advent of Code challenges - https://adventofcode.com/ (by vaithak)

  • Python3 readable solution: GitHub link: https://github.com/vaithak/Advent-of-Code/blob/main/2022/Day-9/code.py

  • AdventOfCodeHaskell

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

  • Haskell. My idea for part 1 was basically "Find all the places the head goes, then follow it with the tail" which ended up working basically for free in part 2, and I chose the lazy implementation of "just compose these functions together manually, its what the language was built for". Definitely going to refactor that part in the morning lol

  • advent-of-code-next

    NextJS Project for Advent of Code

  • [Source Code](https://github.com/MartinSeeler/advent-of-code-next/blob/main/puzzles/09/solution.ts) | [Run Online](https://advent-of-code-next.vercel.app/day-09-rope-bridge)

  • adventOfCode

    Advent of code solutions, probably mostly in C++, but maybe in Rust in the (near) future. (by osalbahr)

  • advent-of-code-2022

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

  • Good thing I prepared a Vector data structure after yesterday's puzzle, came in handy today, and probably will in later days too.

  • advent-of-code

    Advent of Code (by joeledwards)

  • Scala: Parts 1 and 2

  • aoc-2022-rs

    Solutions to adventofcode.com written in Rust. I'm a bit new here, though.

  • Rust (https://github.com/cdkrot/aoc-2022-rs/blob/master/src/day09.rs) I think it’s nice and short ``` use std::collections::BTreeSet; use crate::utils;

  • advent-of-code-2022

    πŸŽ„οΈ My Advent of Code 2022 raw answers (by mauriciabad)

  • Part 1

  • AoC

    Advents of Code in NASM x86_64 assembly (by JustinHuPrime)

  • Part 1 starts by parsing the input. I first count how many steps there are (e.g. "R 4" is 4 steps). Then, after allocating an array to hold those steps, I read in the steps and expanded repeats.

  • advent-of-code

    My solutions for adventofcode.com (by mdwhatcott)

  • AdventOfCode

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

  • Python (original for part 1, part 2, then a general version), then Google Sheets (the first attempt crashed the spreadsheet - Whoops!)

  • advent-of-code-julia

  • Julia without black magic.

  • AoC

    My Advent of Code solutions :> (by Cybergenik)

  • - About 60ms on my system - tuples for the indices, and simple math to update knot position solution

  • aoc2022

    πŸŽ„ (by jenarvaezg)

  • aoc

  • Python [code](https://github.com/mrbaozi/aoc/blob/main/2022/day09/day09.py)

  • advent_of_code_2022

  • Python (3.10) Solution, I'm pretty happy with how it turned out. Need to get rid of the CoordDict stuff which was intended for possible pt 2 needs but can be replaced by a simple set. Git Link

  • aoc2022lisp

  • AdventofCode2022

    My answers for Advent of Code 2022 (by poesraven8628)

  • adventofcode

    Advent of Code challenge solutions (by flwyd)

  • Elixir 8358/5877, code, path ascii art

  • aoc_2022

    Discontinued Bad 2022 Advent of Code solutions (by ClementTsang)

  • Today's solution in Elixir. I first wrote a Python solution to figure out what I generally wanted to write.

  • aoc2022

    Advent of Code 2022 - my answers

  • adventofcode

    My solutions for https://adventofcode.com/ programming mini puzzles - written mostly as sjasmplus script (to exercise the tool and collect ideas for future development of the script language, not because it's a best choice for the task, quite opposite) (by ped7g)

  • U++ (C++ framework): https://github.com/ped7g/adventofcode/blob/main/2022-upp/09_rope_bridge/09_rope_bridge.cpp

  • ultimatepp

    U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

  • U++ (C++ framework): https://github.com/ped7g/adventofcode/blob/main/2022-upp/09_rope_bridge/09_rope_bridge.cpp

  • Advent-of-Code

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

  • advent-of-code

    My solutions for the Advent of Code (by JesperDramsch)

  • Code lives here and I scheduled a [blog post here](rope-bridge-solving-advent-of-code).

  • aoc

    Advent of Code (by ramuuns)

  • adventofcode

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

  • aoc-2022

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

  • advent-of-code-2022-no-imports-python3

    advent of code in python without importing any libraries

  • Scalable Python solution in <40 lines of code (excluding comment lines!) https://github.com/gmorinan/advent-of-code-2022-simple-python/blob/main/day09/day09.py

  • advent-of-code

  • Code on GiuHub: Here

  • aoc_2022

  • Day 9 - Rust

  • aoc-2022

    Advent of Code 2022 in Rust (by litpho)

  • aoc2022

    My own personal overengineered helpers to solve AoC problems in Rust (by udoprog)

  • AoC2022

  • ELIXIR

  • aoc2022

    Advent of Code 2022 in Rust (by Sh4d1)

  • Quite fun, I had around exactly the same code as you, which I refactored to https://github.com/Sh4d1/aoc2022/blob/main/src/day9.rs

  • AdventOfCode2022

    My solutions for Advent of Code 2022. (by SLiV9)

  • advent-of-code-2022

  • Typescript

  • AdventOfCode2022

    LΓΆsungen fΓΌr Advent of Code 2022 https://adventofcode.com/2022 (by Mattizin)

  • Java Github Commit

  • Advent-of-Code-2022

    Solutions for Advent of Code 2022 written in Kotlin (by patrick-elmquist)

  • aoc-2022

    2022 Advent of Code in Clojure πŸŽ„ (by giacomocavalieri)

  • Clojure

  • advent-of-code-2022

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

  • Github

  • AdventOfCode

  • github

  • advent-of-code

    my advent-of-code puzzle solutions (by WildSmilodon)

  • advent2022

  • Python: https://github.com/davearussell/advent2022/blob/master/day09/solve.py

  • advent_of_code

  • Had part 1 almost first try, and then struggled a bit understanding part 2 correctly. Once I did, it wasn't too bad to adjust what I had to work with any number of knots, only thing that tripped me up for a bit was that I was missing the outer corners for "updateTail" as they can't happen in part 1, but will happen in part 2.

  • AdventOfCode2022

    Optimised dotnet solutions for Advent Of Code 2022 (by Timmoth)

  • C# Solution

  • AoC2022

  • AdventOfCode

    My solutions to Advent of Code (by d12bb)

  • I'm doing different language each day, all solutions here.

  • aoc2022

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

  • AOC

    Advent of Code (by CptCookie)

  • the first part took me more time then I am willing to admit but here is the central idea of my class based solution. more in the repo

  • aoc2022

  • Advent-of-code-2022-golang

    2022 golang solutions of Advent Of Code

  • golang solutions

  • adventofcode2022

  • Github

  • aoc2022

    Advent of Code 2022 (by lupari)

  • link

  • advents-of-code

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

  • advent-of-code

  • A couple of variations done in Scala 3 today.

  • aoc

    Advent of Code (by timle8n1)

  • Don’t seem too many Ruby solutions: github

  • aoc-go

    A Golang tool for generating code for Advent of Code

  • adventofcode

    Advent of code solutions (by mathsaey)

  • advent-of-code

    My solutions to the Advent of Code (by aaronreidsmith)

  • Scala. Not too bad with my Point helper class. After part 1 I refactored the movements into a move helper that just takes 2 arbitrary points; the current point and the one we are moving towards. Then it was easy enough to just apply that in order each iteration for part 2.

  • advent-of-code

    solutions for Advent of Code (by micod-liron)

  • I have created custom Rope class to move the knots and made use of the built-in class Point and its methods `fourNeighbours` and `eightNeighbours`.

  • AdventOfCode

    2022 Advent Of Code team review (by Jackbennett)

  • Day 9 in Swift

  • adventofcode

    Advent of Code πŸŽ„ (by markus-k)

  • AoC2022

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

  • aoc-22

    Here are my solutions for the Advent of Code 2022 (by rogue-kitten)

  • - [Part 1](https://github.com/rogue-kitten/aoc-22/blob/main/Days/Day9/part1.cpp)

  • advent-of-code-2022

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

  • AdventOfCode2022

  • PYTHON A solution that leverages a lot the itertools library

  • aoc

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

  • advent_of_code

    Advent of Code (by craigbanyard)

  • Python

  • aoc2022

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

  • AdventOfCode2022

  • advent-of-code

    Advent of Code 2021 (by TenViki)

  • Yeah, I had the same problem with the hash function. I gave up and cheated by turning my coordinate into a std::string β€œx,y” and storing that in the set. (Line 55 - https://github.com/MicahSpikah/advent-of-code-2022/blob/main/9b.cpp)

  • aoc2022-25-in-25

    Advent of Code in 25 languages

  • 25 days in 25 languages

  • advent2022

    Advent 2022 PHP (by gende0808)

  • PHP# github

  • AdventOfCode

  • advent-of-code

  • Part 1 & 2

  • aoc-2022

    Advent of Code 2022 journey with Rust (by jokr-1)

  • My Rust solution, pretty happy with the update function...

  • AdventOfCode2022

    My solutions to Advent of Code 2022 (by willkill07)

  • aoc22

    Advent of Code 2022 Solved with Haskell! Criticism welcome! (by blaz-kranjc)

  • Never had part 2 done some quickly after part one, `iterate` is amazing! Haskell

  • adventofcode

    adventofcode.com solutions (by linl33)

  • adventofcode

  • C++ github

  • AoC_2022

    Advent of Code 2022 (by a-ghigi)

  • PHP: https://github.com/a-ghigi/AoC_2022/tree/main/09

  • advent_of_code_2022

  • advent

    advent of code (by jasontconnell)

  • advent-of-code-2022

  • It ain't pretty, but PHP: https://github.com/dsamojlenko/advent-of-code-2022/tree/main/day09

  • aoc2022

  • It's not pretty, but it's mine.

  • aoc2022

  • AoC2022

  • Rust. Pretty clean solution with elegant use of constant generics: https://github.com/AlexanderNenninger/AoC2022/blob/master/src/days/day09.rs

  • adventofcode

  • github

  • adventofcode22

    Advent of Code 2022 (by Overij)

  • aoc2022

  • advent-of-code-2022

  • My solution

  • advent_of_code

    My attempts to solve https://adventofcode.com (by shrugalic)

  • Once I figured out how to elegantly move the tail using signum() in part 2 it became so much cleaner. Full code is on GitHub, but here's the core of it:

  • AoC2022

  • Python

  • aocd

    Python solution for Advent of Code 2022

  • Short solution using custom Coordinates class.

  • Advent-of-Code-2022

    my solutions to the Advent of Code 2022 (by copperfield42)

  • Python3

  • adventofcode-2022

    Advent of Code 2022 (by dehan-jl)

  • Github

  • Advent-Of-Code-2022

    My solutions for Advent Of Code 2022. Every day is written in another language, chosen randomly. (by Jomy10)

  • Swift

  • rust_aoc

  • Github Link

  • advent-of-code

    Solutions to the Advent of Code puzzles in various languages (by dhruvmanila)

  • aoc_2022

    My solutions to advent of code 2022 (by RHL120)

  • AoC2022

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

  • AdventOfCode

  • github

  • Advent-of-Code

    Advent of Code problems solved in Python. (by derailed-dash)

  • Code on GitHub (includes unit test)

  • aoc

    Advent of Code 2022 πŸŽ„ (by dwhinham)

  • adventofcode

  • Another Ruby solution. https://github.com/JeffreyMPrice/adventofcode/blob/main/day09/day09.rb

  • rusty-aoc

    My solutions to Advents of Code in Rust

  • Mine in rust too is there: https://github.com/Philippe-Cholet/rusty-aoc/blob/main/aoc2022/day09/src/lib.rs

  • advent-of-code

    My solutions of adventofcode.com, with TypeScript (by mastondzn)

  • TypeScript this one was by far the hardest for me, i had to take a break after seeing part two but im pretty proud of my solution

  • Advent-of-Code-2022

    Advent of Code 2022 - in Rust! (by Killavus)

  • aoc2022

    Advent of Code in Elixir, Julia, Python and Rust #aoc #adventofcode (by Lakret)

  • Github

  • Advent-of-Code-Day9

  • haskell

    My Haskell Learning (mostly AOC) (by martinhelmer)

  • Full Code

  • advent-of-code-2022

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

  • advent-of-code-2022

  • Python solution

  • advent_of_code

  • Rust | Github

  • adventofcode2022

    My solutions for the 2022 Advent of Code challenges (by ceganwyer)

  • Rust: GitHub

  • Dlang bruteforce solution. For some reason I thought the rope was 9 knots long and kept getting off by one results. Relevant part 2 portion :

  • a2tools

    Stuff I write for my Apple //c

  • Still, here's the BASIC code (part 1 only) that runs very veeeeery slowly on the //c, but mostly, I'm quite happy about the fast one in C ! (both parts using #define N_KNOTS)

  • advent-of-code

  • advent-of-code-solved

    My advent of code, in jq…

  • AdventOfCode2022

  • GitHub link

  • advent-of-code-2022

  • With the solution to part 2 being similar. Full source code here https://github.com/dionysus-oss/advent-of-code-2022/tree/main/day-9 and a video which goes into detail about how the solution works https://youtu.be/6eqUvtcChWs

  • AdventOfCode2022

    Repository for advent of code code to find solutions. This year in Go. (by BlaximusIV)

  • My solution is in Go. Still learning the language so if you have any tips or tricks to clean my code and make it more idiomatic, I'd love to hear them!

  • adventofcode

  • Would you be able to test https://github.com/joatca/adventofcode/blob/main/2022/9.cr on the same hardware?

  • aoc

    advent of code (by razorfog)

  • AdventOfCode

    My solutions to Advent of Code (by DanaL)

  • Repo!!

  • advent-of-code

    Advent of Code (by elektronaut)

  • Github

  • Concise solution, ~50 lines.

  • AdventOfCode

    Solutions for Advent Of Code problems (adventofcode.com) (by randyppa)

  • Full code here: https://github.com/randyppa/AdventOfCode/blob/main/2022/day9.py

  • Misc-DSA-Practice

  • My Python solution reproduced below. Used numpy just to make math on coordinates less cumbersome.

  • AdventOfCode2022

    Advent of Code 2022 done in Ruby (by SolarBear)

  • Here's mine! https://github.com/SolarBear/AdventOfCode2022/blob/main/day9.rb

  • hatchery

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

  • rust, took a bit to settle on this one. i don't hate it. uses a const generic for rope length

  • adventofcode2022

    jupyter notebook for my adventofcode2022 challenge (by gtempel)

  • python/jupyter

  • advent_of_code

  • my crystal solution runs in 25ms

  • AoC2022

  • Code: day9.py

  • advent-of-code-2022

  • advent-of-code-ts

    My solutions to AoC puzzles in Typescript (by rogisolorzano)

  • advent-of-code

  • advent-of-code

  • Solution in go: day09.go

  • advent_of_code_2022

  • Python Code

  • advent-of-code-2022

    Solutions for Advent of Code 2022 (by 99heitor)

  • aoc2022

    My Advent of Code 2022 solutions! (by SourishS17)

  • Advent-Of-Code-2022

    AoC Solutions in Idris (by daysleeperx)

  • Not super happy about this solution, but it worked

  • advent_of_code_2022

    Advent of code 2022 (by HendrikPetertje)

  • AoC2022

    Merry Christmas, y'all !!! (by tobstern)

  • aoc22

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

  • Tiny little thing you could do to make this even more succinct: Use `abs()` on `dx` and `dy`, that's what I did!

  • advent_of_code

    https://adventofcode.com (by hannesschaletzky)

  • If somebody wants to laugh, check my poor only part 1 solution on my GitHub.

  • advent

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

  • advent-of-code-2022

  • AdventOfCode-Day9-RopeBridge

    C# console app that solves the AdventOfCode Day 9's puzzle - RopeBridge

  • Full Code

  • adventofcode2022

  • github repo for this day

  • advent-of-code

  • code

  • advent-of-code-2022

    my solutions to advent of code 2022 (by nikhilreddydev)

  • can someone help me figure out what's wrong with my c++ code.

  • AdventOfCode

    My own solutions of Advent of Code to practice programming languages. (by nazarpysko)

  • Github

  • advent_of_code

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

  • The core of my solution below using numpy (because I'm learning it!). See github for full code.

  • advent-of-code

    My advent of code solutions (by mschout)

  • Another Java Solution link

  • adventofcode

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

  • aoc

    KlongPy Advent of Code (AoC) solutions (by briangu)

  • Code 9a

  • advent-code

  • did it but the code is spaghetti - https://github.com/Jelly-Pudding/advent-code/tree/main/day9

  • AdventOfCode

  • aoc

  • AdventOfCode

    Solutions to the Advent of Code 2022 puzzles. (by a-paudel)

  • I'm late and trying to speed through it all. Using Python, link to repo

  • advent-of-code-go

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

  • 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