Our great sponsors

WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easytouse, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

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

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

adventofcode2023
Joel Eisner's completed TypeScript x Bun code challenges for "Advent of Code" 2023 (by joeleisner)

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

adventofcoderust
Complete 2023 to 2019 and 2016 to 2015 entries for the annual Advent of Code challenge, written in performant Rust. (by maneatingape)

AdventOfCode
Repository to store the solutions for AdventOfCodes. 2021 in Apex, 2022 a mix, 2023 in JS, challenge accepted! (by foxysolutions)

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)

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

AdventOfCode
Contains all my personal submissions for the yearly Advent of Code coding problems game. (by henriupton99)
Same Algo as my python code from earlier, now just using math not search space reduction also blazing fast in micro seconds https://github.com/Fadi88/AoC/tree/master/2023/day06
Here's the link to the full code
[LANGUAGE: Python 3] 66/101 Raw solution code
Code
[LANGUAGE: Python] GitHub
Gitlab
Code: main (de0beb6)
github
part 1: https://github.com/imaperson1060/adventOfCode/tree/main/2023/day6/part1.js
GitHub
Also, here's Part 1 in Python
Used the quadratic formula to do this in O(1) time: github
[LANGUAGE: C] Part 1 Part 2 4899/5869 easiest one so far. Did a naive approach literally following the steps it gave me and it still ran instantly. No one is heating their homes with this one.
Day 6
Link
Day 6 Solved the quadratic equation and counted the number of integer solutions in between the roots which may have been overkill. The third example was very useful to prevent wasting time when the roots are integers already.
[LANGUAGE: Python] 6072 / 5257 Github link First time waking up at 5:30 AM to compete with you people ! Just to realize that I'm really slow to code lol
Solution
Link to full solution
part 1 part 2
Part 1
Day 6
Part 1
Link to GitHub
GitHub
GitHub
Very fun day. Right now just iterating over speeds (but prettily, with oneliner list comprehension stuff). Thinking about the math, this sounds like solving two quadratic equations. Which I might try later :)
Github
Solution
GH Link (both parts)
Solution
[GitHub]
TypeScript x Bun Solutions for Day 6 (Parts 1 & 2)
Day 6
[LANGUAGE: Haskell] 1 / 485 Github
[LANGUAGE: Rust] 107 / 47 Github
Much easier than yesterday's :D
Github Link
Part 1
Code (Github)  47 sloc
GitHub
Jactl
Easiest one so far. I just looped over all ranges for submission but nicer one (imo) here: https://github.com/cranil/aoc2023rs/blob/main/src/day6.rs
link to notebook
Rest of the code computes both parts in 431.0ns  each search checks 25 different press times for my input in part2.
GitHub
https://github.com/ropewalker/advent_of_code_2023/blob/master/src/day06.rs (4.7729 ns and 18.761 ns on my machine).
(GitHub link)
[LANGUAGE: Python 3] 20/50. Solution. Video.
Very compact solution using the quadratic formula and a little approximation hackery: https://github.com/chenson2018/adventofcode/blob/main/2023/06/ocaml/06.ml
Github Day 6
[LANGUAGE: BQN]
[LANGUAGE: Python]
Rust Solution
Day 6 Github
Solution
Github
Github
Solution
github
Solution on Github
[Language: TypeScript] Github for both parts
Solution
[Language: Python] solution
github
part1
Solution: https://github.com/TesteurManiak/adventofcode2023/blob/main/solutions/day06.dart
Day 6
My solution. Takes only 40 ms including reading input and calculating both solutions. Taken a sheet of paper and solved the equation.
[Language: Uiua] Got today's done in Rust nice and quick (for me), so decided I'd give it a shot in Uiua.
[LANGUAGE: Rust](https://github.com/vesk4000/adventofcode2023/blob/main/src/bin/day6.rs)
[Language: Golang] Code
[LANGUAGE: Elixir] Day 06
Github link
D06.h on GitHub
Github
Repo
day6.pl on GitHub
Implementic quadratic formulas felt like day 1. Not the most elegant solution, but after yesterday, I'll take it.
Here's my oneline solution for Day 6, both parts in one, with q[6] as the input file:
Github
My brute force ran in 50 and 500 ms but I guess it won't hurt googling the quadratic formula nevertheless....
GitHub
My rustyaoc repo & today' solution here.
Github  Day 6 2023
[Language: Rust] https://github.com/newtondev/adventofcode/blob/main/2023/src/bin/06.rs
I solved the quadratic equation and that makes the whole program run in 1.2 ms on a Raspberry Pi 4. But simply trying every possible button time isn't much slower: also took milliseconds, shrug. Here is my very verbose function to solve per race. The sq < 0 test was not necessary for the example or my input. Complete code: https://github.com/ednl/adventofcode/blob/main/2023/06.c
Just solved it analytically on paper and then implemented the equation because I didn't have a proper calculator at hand. Honestly though, even just using the builtin MacOS calculator would've been faster in the end...
Full writeup on my blog and code on Gitlab.
Source code in GitHub. Both the brute force and maths solutions, for illustration.
I left the brute force in the helpers fsx and used the math in the main fs Link Github 2023 Day 06
Thought it would be fun to use SymPy for this even though it's substantial overkill.
Solution day 06. Lesson learnt from yesterday I went directly for the math instead of brute forcing: https://github.com/RobinCamarasa/Adventofcode/blob/master/2023/day06/RobinCamarasa/Day06.hs
[Language: rust] https://github.com/Kintelligence/adventofcode2023/blob/master/day06/src/lib.rs Started with brute forced but optimized when I hit part 2. Started using Criterion for benchmarking. Benchmark  Part 1  Part 2
Used the standard quadratic formula approach. Github
Code: Day06
https://github.com/duketide/advent/blob/main/haskell/src/Y2023/Day6.hs (brute force)
[LANGUAGE: jq] github
Binary search with forward jumps and using symmetry. GitHub
My repo
github
Part 1 (4μs)
Hey, Forth may have began development in the late 60s, but that hardly makes the language obsolete! It's super versatile yet terribly undervalued, and is absolutely worth checking out if you're not familiar with it. My goal is (and has been) to complete every day in Forth, see my repo for my solutions.
Here are my readable, short and concise versions Here are the golf code versions superior golfed code at the bottom ;)
GitHub
Full code
Github
Day 06 solution: GitHub
Part 1 and 2
Part 1 Part 2:
Part 1  simple brute force loop
First implementation using brute force
If anyone is interested im trying language a day https://github.com/QuarkNerd/adventOfCode/tree/master/2023
Part 1 and 2
Part 1 Part 2
Part 2 takes a while, but it's a hiccup while which is totally acceptable to me. Code
[LANGUAGE: C#] https://github.com/ryanheath/aoc2023/blob/master/Day6.cs
Code for Day 6
Code
My solution in Common Lisp.
part 1 part 2
I found 3 ways to solve the problem, each building in performance optimizations. The last is with math, using the quadratic equation to find the range of times that beat the distance record. Full explanation here.
github
[Language: Python] Gitlab
Code: github
Solution in Kotlin
GitHub
https://github.com/turtlecrab/AdventofCode/blob/master/2023/day06.ts
[LANGUAGE: TypeScript] https://github.com/galnegus/adventofcode2023/blob/main/day06waitforit/index.ts
GitHub
The full code. So I got the equation.
BASIC: https://github.com/wilkotom/Aoc2023/blob/main/day06/src/main.basic (Completes both parts on an emulated BBC B in about 5 minutes) Rust: https://github.com/wilkotom/Aoc2023/blob/main/day06/src/main.rs
Day06
link
[Github]
I am not a strong mathematician so I solved part 2 by coming at the range where records happen from both ends of the time range and subtracting. Then I refactored part 1 to do the same. My code can be found on GitHub, I've written this up on my blog, and here are my 2023 Solutions so far.
[Language: Java] https://github.com/BeBitbox/adventofcode/commit/cdf69dbef33d211c03da3d745461de0b35483188
Github
On GitHub.
Github Repo
Solution repo
Link
Git
GitHub Part 1: brute force, GitHub Part 2: quadratic formula
https://github.com/gorkempacaci/AdventOfCode2023/blob/main/Day6/day6a.pl https://github.com/gorkempacaci/AdventOfCode2023/blob/main/Day6/day6b.pl
Github: Day 06
Part 1 Part 2
Github repo
My solution, using quadratic equation. Took a bit of time to get all the edge cases in, but other than that it was simple enough. https://github.com/LinAGKar/adventofcode2023rust/blob/master/day6/src/main.rs
Github
Link to code
part 1 was brute forced, part2 was brute forced, and then I felt that the input was pitting me, so I used quadratic math ... after a break
Part 1/Part 2 the only difference between them is the parse. Solved using Bhaskara formula
Once again, I need to use math, which isn't always the best with TCL, but ... my old math teacher would be happy with this solution, I think.https://github.com/mek/aoc2023/blob/trunk/day_6/day_6.md
Easiest day so far w/o questions (I know it could be smarter mathematically but it works lol) https://github.com/ptakpatryk/adventofcode2023golang/blob/main/day_06/day06.go
GitHub .cpp file
[Language: JavaScript] github 23ms. Pretty naive approach but it works. Searched from longest and shortest possible press inwards until a max and min winning value's found.
My Day 6 solution on GitHub
github brute force
Parts 1 & 2
Parts 1 & 2
I still haven't solved day 5 pt 2, but day 6 was easy (for me). Brute force worked on part 2 (18 seconds), too. Full writeup is on Git
Easy day TypeScript, P1  Brute Force, P2  Formula