Our great sponsors
-
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.
-
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.
-
advent-of-code-rust
Complete 2023 to 2019 and 2016 to 2015 entries for the annual Advent of Code challenge, written in performant Rust. (by maneatingape)
-
Advent_of_Code_2023
My advent of code solutions for 2023 in mostly python and c++ but maybe other languages if I want to :^) (by lmitlaender)
-
advent-of-code-2023
Discontinued Advent of Code 2023 in Rust, 2 stars for days from 1 to 18. (by phantie)
-
AdventOfCode
Repository to store the solutions for AdventOfCodes. 2021 in Apex, 2022 a mix, 2023 in JS, challenge accepted! (by foxysolutions)
-
advent
Attempts at solving the annual Advent of Code, the daily christmas themed coding challenges. (by Kingzel)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
https://github.com/mark-boots/Advent-of-Code/blob/main/2023/day9/index.js
I’m same background learning rust this year! Check out mine: https://github.com/bozdoz/advent-of-code-2023/blob/master/day-09/src/main.rs
[LANGUAGE: Julia] 521/293 Code
Solution Uploaded here: https://github.com/fschatbot/Advent-Calendar-Python/blob/master/2023/9.py
solution here
Oh man, it's Friday night, I was ready for something epic. Oh well, yay recursion. No github link, this is all of it. Still waiting to break the top 1000 on part 2 this year, but I got close this time.
Solution
Code for both parts here: https://github.com/EvilKanoa/AoC-2023/commit/834635b81c62515ce3194df233d0c51eefa768ef
GG EZ
Solution
Part 1 & 2
:D
Github
Github repo
Solution
Solution
LANGUAGE: Rust
Part 1 involved a direct solution - for each line, I read it into a dynamically allocated array, then allocated a new array and calculated the differences between the previous array's elements, and so on until I got an array that's all zeroes. I then proceeded to extrapolate - I found the end of the list, and added the end of the previous list to this list to get the new element to add to the end of the list - I actually didn't need to save this value in new space, I could have just overwritten the old end of the list.
[Rust] https://github.com/Kromzem/advent_of_code/blob/main/src/day_nine.rs
Solution
github
Day 9
I resisted the urge to do this in some clever numpy way. But this really felt like a problem meant for vectorized diff functions. Or for some neat recursive solution. I just went for something pretty straightforward and part 2 was not so nasty today :)
Go
Code
Nice an easy one to start the weekend happy...but I think we'll be crying tomorrow as visit the island... Link Github 2023 Day 09
https://github.com/encse/adventofcode/blob/master/2023/Day09/Solution.cs
[LANGUAGE: Rust] Does this make me a (one-)line-cook?!
The solution is here: Solution
Reworked my solution to use this approach.
[LANGUAGE: Python] Used pairwise from itertools to get the pairs of values. https://github.com/vigge93/AoC/blob/master/2023/day9.py
Both parts ~800 μs each excluding parsing. https://github.com/gitpushjoe/aoc23/blob/main/day9/solution.cpp
Complete solutions : https://github.com/DarioTheLuca/my_advent_of_code/blob/master/aoc2023/src/day09/index.ts
Defaulted to vectorized bruteforce with numpy, fully expecting to have to refactor for GPU. Did not expect it to work so easily.
A recursive solution with essentially 4 lines of code for the logic.
No need for an option to reverse when there's `pushfirst!()` to [do it all in one pass].
and yeah, GG EZ indeed
Straightforward solution: https://github.com/ThomasBollmeier/advent-of-code-2023/blob/main/09/main.py
Click here for a solution which will predict the humidity and other values, in all directions you can think of! You'll be able to use the water from the oasis, and predict when exactly it'll be salty enough for your taste!
Github Link
GitHub Repository
Day 9 Part 1 & 2
[Code]
Full code at GitHub.
Code
github
GitHub
It's all about high order arithmetic progression. Almost instant output. Solution Here. Just one formula. Thanks Newton 🫡
Anyway, after noticing that the sequences in the input are not arithmetic, I decided not to look for any fancy solutions. I initially went for lists and solved both parts instantly, but then I decided to do it more properly, so hello, deques.
There's no backward in going forward, as my grandfather used to say. Except for my answer to part 2 of this puzzle, which is taking backwards and flipping it around.
Day 9 2023 - Part 1 and 2 - Github
This is straightforward. Now I can eat my breakfast.
No imports, nothing complicated, somehow it worked... 🥹
GitHub
https://github.com/thrilway/AoC2023/blob/3a8ae0097f1fbb23691f9c2859c6f0eb85a8e94b/09/day09.rkt
Uiua playground Github
Link
Part1: https://github.com/SimonNyvall/AdventOfCode2023/blob/main/day9.fs
Github day 09
Github. Always a big love for recursion and appreciating when it's rewarded by 2nd puzzle :P
Solution
Solution
github
https://github.com/fasteasyfree/AdventOfCode/blob/main/2023/9-1.ps1
github
Today beats yesterday as my fastest solve! Fairly short too, so I'll include my one-line solutions in-line. q[9] contains the input. Here is my updated visual of the Basilisk, which combines all my one-line solutions into a single, disgusting line of code!
[Language: Java] https://github.com/MarginallyClever/advent-of-code/blob/main/src/main/java/com/marginallyclever/adventofcode/y2023/Day9.java
Day 9
solution with some simple recursion
Day 9.js
Github Link
GitHub link
Part 1: 9A
[LANGUAGE: Go] Github
Classic iterative approach
Here's the relevant extract from my (recursive) solution. Full code on GitHub.
Here is the solution, quite easy : https://github.com/SimonGirardSfeir/AdventOfCode2023/tree/main/src/main/java/org/girardsimon/day09
[Part 1 and 2](https://github.com/rlemaitre-ledger/advent-of-code/blob/main/src/main/scala/adventofcode/aoc2023/day09/Day09.scala)
https://github.com/dave-cao/David-s-Advent-Of-Code-2023/tree/main/day_9
[LANGUAGE: Rust] Simple iterative solution: GitHub link
Part 1 & 2 Github link
Github
Github Link
Used itemgetter to make solution generic for both parts: github
I did the brute force algorithm first and was kind of bummed it worked. Went back for the Lagrange Solution. Interestingly it gets very very close, but I still need to do Math.round to get the correct output. https://github.com/nicklpeterson/advent-of-code/blob/main/2023/9.js
[Language: JavaScript] github 8ms.
Anyway my solution available on my GitHub
Solution Day 9 here: GitHub
Behind the scenes it is also diffing the output of the solutions against the expected outputs, and it's all a single self-contained (albeit spaghetti) Makefile. Bon appétit!
Golang Solution
[LANGUAGE: Raku]: https://github.com/mcmillhj/aoc/blob/main/2023/09/mirage-maintenance.raku
I’m somewhat new to rust as well but here’s my attempt: https://github.com/devashishp/advent-of-code-2023/blob/main/day9/src/main.rs
Part 1: Loop creating an array of differences to add to the main array, until you reach 0,0,0. Take the last number from each and add to get the next in the sequence.
Solution using Lagrange interpolation
https://github.com/ransoing/AoC23/blob/main/src/day9/solution.ts
A bit late to the party, but still enjoyed this one.