-
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
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Here's the link to the full code
-
[LANGUAGE: Python 3] 66/101 Raw solution code
-
Code
-
[LANGUAGE: Python] GitHub
-
Gitlab
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
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.
-
AdventOfCode-2023
Discontinued Answers to the 2023th edition of the Advent of Code [GET https://api.github.com/repos/NicolasBizzozzero/AdventOfCode-2023: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] (by NicolasBizzozzero)
[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 one-liner list comprehension stuff). Thinking about the math, this sounds like solving two quadratic equations. Which I might try later :)
-
Github
-
aoc-2023
Discontinued [GET https://api.github.com/repos/ish-u/aoc-2023: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] (by ish-u)
Solution
-
GH Link (both parts)
-
Solution
-
[GitHub]
-
advent-of-code-2023
Joel Eisner's completed TypeScript x Bun code challenges for "Advent of Code" 2023 (by joeleisner)
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/aoc2023-rs/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)
-
AdventOfCode
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
[LANGUAGE: Python 3] 20/50. Solution. Video.
-
Very compact solution using the quadratic formula and a little approximation hackery: https://github.com/chenson2018/advent-of-code/blob/main/2023/06/ocaml/06.ml
-
Github Day 6
-
[LANGUAGE: BQN]
-
[LANGUAGE: Python]
-
-
advent-of-code-rust
Complete 2024 to 2015 entries written in Rust for the annual Advent of Code challenge, solving 500 stars in less than 1 second. (by maneatingape)
Rust Solution
-
-
-
Day 6 Github
-
Solution
-
-
-
AdventOfCode
Repository to store the solutions for AdventOfCodes. 2021 in Apex, 2022 a mix, 2023 in JS, challenge accepted! (by foxysolutions)
Github
-
Github
-
Solution
-
github
-
Solution on Github
-
[Language: TypeScript] Github for both parts
-
Solution
-
[Language: Python] solution
-
-
github
-
part1
-
-
Solution: https://github.com/TesteurManiak/advent-of-code-2023/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/advent-of-code-2023/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
-
Advent-of-Code-2023
The little lawyer that could (eventually and with help) solve everything! (by Leftfish)
Implementic quadratic formulas felt like day 1. Not the most elegant solution, but after yesterday, I'll take it.
-
Here's my one-line 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 rusty-aoc repo & today' solution here.
-
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)
Github - Day 6 2023
-
-
[Language: Rust] https://github.com/newtondev/advent-of-code/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.
-
-
AdventOfCode_Main
Discontinued Solutions in F#, Go, C++, Typescript for Advent of Code event [GET https://api.github.com/repos/blfuentes/AdventOfCode_Main: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository]
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/Advent-of-code/blob/master/2023/day06/RobinCamarasa/Day06.hs
-
-
[Language: rust] https://github.com/Kintelligence/advent-of-code-2023/blob/master/day-06/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
-
Advent-of-Code-2023
Discontinued [GET https://api.github.com/repos/sun12fff4n/Advent-of-Code-2023: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository] (by sun12fff4n)
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/Advent-of-Code/blob/master/2023/day06.ts
-
[LANGUAGE: TypeScript] https://github.com/galnegus/advent-of-code-2023/blob/main/day-06-wait-for-it/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/advent-of-code/commit/cdf69dbef33d211c03da3d745461de0b35483188
-
Github
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 and 2024 in Scala (by sim642)
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/advent-of-code-2023-rust/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/advent-of-code-2023-golang/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
-
Day 6 Part 1
-
Code Link: https://github.com/ssavi-ict/Advent-of-code/blob/main/aoc23/aoc-day6.cpp
-
Advent-Of-Code-2023
Archive of my solutions. I will be doing my best to golf all of them for fun. (by Nico-Posada)
I go rather silly https://github.com/Nico-Posada/Advent-Of-Code-2023
-
-
Code: https://github.com/coreyja/advent-of-code-2023/blob/main/06-wait-for-it/src/main.rs
-
Using quick maffs: Link to GitHub
-
Part 1 and part 2 were very similar. The parsing was very standard, but then I had to do math with floating point numbers. And that involved new instructions - cvtsi2sd, for example (convert scalar integer to scalar double), and the rest of the modern SSE floating point operations. (While you could still pretend you had an 8087 and use such instructions as fmul, in practice, it's a lot nicer to use the SSE equivalents.) I then had to round everything back into integers, but I also had to fake the rounding modes "ceil-but-always-move-up-one" and "floor-but-always-move-down-one" - which lead me to the comisd (probably stands for compare like integers scalar doubles) instruction. Apparently there's a cmpsd instruction, but it returns results as a mask, which I guess might be useful for branchless operations on floating points. I didn't want to bother, and performance was not a major concern. You do get the default floor and ceil rounding modes, though - as well as truncation and rounding to even. I also had to deal with floating point constants. Floating point constants can't be inline, they must be loaded from memory, so I had to use the .rodata section for the first time.
-
Day 6 solution
-
Haskell solution
-
Parsing is overkill, but satisfying :)
-
aoc-2023
Discontinued My Advent of Code 2023 Solutions [Moved to: https://github.com/AJMansfield/aoc] (by AJMansfield)
-
Link to the assembly source (all hand-written): https://github.com/Stevie-O/aoc-public/blob/master/2023/day06/aoc-2023-day6-textoutput.intcode
-
Solution
-
-
NB: The average durations are calculated using utility methods in lib.rs
-
github
-
https://github.com/hiimjustin000/advent-of-code/tree/master/2023/day6
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives