Our great sponsors
-
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.
-
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.
-
AdventOfCode
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
-
AdventOfCode2022
Solutions to all 25 Advent of Code 2022 in Rust 🦀 Less than 100 lines per day, total runtime of less than 1 second. (by AxlLind)
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)
-
advent-of-code-2022
🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2022 (by timvisee)
-
aoc
:christmas_tree: My collection of Advent of Code solutions, with all years in one repository. (by SebastianPrehn)
-
advent_of_code
This repository contains my solutions for the Advent of Code programming challenges. (by GabrielTorland)
-
advent-of-code-2022
The 2022 adventofcode.com JavaScript solutions I've written for the YouTube videos (https://www.youtube.com/@thibpat) (by tpatel)
-
Clippy
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
-
AdventOfCodeTI83
As many Advent of Code problems as possible, done in Z80 assembly language for the TI83 graphing calculator.
-
advent-of-code-2022
Solutions for Advent of Code 2022, written in JavaScript using node.js (by johnbeech)
-
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
This repo contains my solutions to the advent of code event. Learn more about advent of code at https://adventofcode.com (by AhmarTheRed)
-
adventOfCode
Advent of code solutions, probably mostly in C++, but maybe in Rust in the (near) future. (by osalbahr)
-
advent-of-code
My Advent of Code submissions. For 2021 and before, these are the original code I used, without any modifications after-the-fact. As such, they are probably not as efficient or short as they should be, because I want a working solution faster, not a better solution. For 2022 and after, these are the solutions uploaded to my YouTube channel.
-
jmurmel
A standalone or embeddable JVM based interpreter/ compiler for Murmel, a single-namespace Lisp dialect inspired by Common Lisp
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
github link
So I added some profiling and a single pass implementation. Had to go x10000 input size to see much impact, and even then:
First time doing AoC, improving my Python. Also basically first time using Git Hub.
I like the trick with keeping and sorting only the maxes we are interested in, I did something similar (but sorting only 3-element array): https://github.com/mrk-its/aoc2022/blob/main/day01/src/main.rs
That's awesome! No worries about reading the plain code, there's quite a bit going on. I've made a documented version of the part 2 code, link here, to help explain it.
in idiomatic Go, you must check errors whenever possible. you use the "github.com/samber/lo" package solely to hide error checking and forgot to check scanner.Err()
If you are looking for resources to get started, I used this interpreter: https://codewithrockstar.com/ and the docs here: https://codewithrockstar.com/docs
Late to posting, but my solution in Crystal.
Code | Blog Walkthrough
You can map + sum to be a bit more idiomatic. Here is my solution. I'm quite late to the party, I know. https://github.com/snowe2010/advent-of-code/blob/master/ruby_aoc/2022/day01/day01.rb
github
Python 49/28. Video of me solving. Final Code.
GitHub
Link to solution
All solutions so far
Full Code
See it on GitHub here.
Common Lisp 2468/2489
python
352 solutions and counting to AOC 2015-2022 in Java over on github , feel free to check it out, utilize it, and reach out with questions or bugs!
Python, 6 lines
Kotlin
C# Code Here
Rust
Happy to be doing another AoC!
Link to solution
J solution. https://github.com/Toanuvo/Advent-of-code
Java https://github.com/martenhernebring/aoc2022/tree/solution
Typescript
Part 1: https://github.com/wmt1276/advent-of-code-2022/blob/main/1a.py
Rust
Day 1
Part 1:https://github.com/fudgebucket27/AdventOfCode2022/tree/master/Day1Part1
Elixir - 4182 / 2942 (I'm just happy to be here)
Python
In C#, using my own tool https://github.com/FaustVX/adventofcode
Pretty excited for AoC starting and all the daily headaches i'm gonna be having. Today's Javascript solution
Elixir, source on GitHub
Common Lisp, source on Gitlab.
Factor:
My Scala solution.
Scala solution :)
Source
Part 1 was slightly scary - I wasn't expecting two-dimensional input data, and that had me reaching for brk, but I found a single-pass solution. I'd keep track of the calories for the most supplied elf and the calories for the current elf. If the current line isn't empty, then add the number to the current elf. If the current line is empty, then let the most supplied elf's calories be the larger of its current value and the current elf's calories.
Swift (repo link)
Dyalog APL
C++
Python Solution & Video included! Python Code| Video Explanation!
C# 34/34
Rust: https://github.com/ropewalker/advent_of_code_2022/blob/master/src/day01.rs
There's a compiler over here if you want to mess about with it.
5 lines of Python: https://gitlab.com/RedPixel/aoc2022/-/blob/main/day1/day1.py
Full code: Github
File - https://github.com/typecasto/aoc2022/blob/main/day_1.nvmacro (in case you actually want to run it)
OCaml solution:
Rust Day 1
Part 1 https://github.com/NiliusJulius/advent-of-code-2022/blob/main/states/1a.c
My Haskell solution :) https://github.com/mstksg/advent-of-code-2022/blob/main/reflections-out/day01.md
my version
Part 1&2 : https://github.com/Shadowwws/AdventOfCode2022
Python 3: https://github.com/kresimir-lukin/AdventOfCode2022/blob/main/day01.py
Source: github.com/sanraith/aoc2022/.../day01.rs
Julia
Julia using ResumableFunctions
code
If you want, you can have a look at my AOC parsing utilities - this really is nothing fancy, just a few functions doing what is needed most of the times (reading a file as a list of lines, as a list of "blocks" separated by empty lines, as a 2D array ...)
For simple string processing, there are some functions in the language, that you can find listed here (for string-specific functions) and here (for more generic sequence-handling functions). For anything involving regular expressions, cl-ppcre is the way, in particular the split and register-groups-bind functions.
Should have mentioned, I'm using this helper template https://github.com/timkelleher/aocgen - the auto generate fn creates this struct, I assume it's used somewhere in the framework
See on GitHub
I'll probably give a few more of them a try. It's not a pleasant language but anything is possible, see this persons raytracer! https://github.com/64/cmake-raytracer
Day 1 solution on github
Part 1 0.027ms (27 μs)
Github
05ab1e (note needs this branch that adds a new parsing command https://github.com/monkeygroover/05AB1E/tree/add-readtoeof)
Go Github
You can abstract out the commonly used functions into a utils package like this: https://github.com/vgnh/advent-of-code-2022/blob/main/utils/common.go
Link to solution: https://github.com/goggle/AdventOfCode2022.jl/blob/master/src/day01.jl
Scala
Swift repo
I did whole AoC last year in Rust and Im going to do the same this year, here you go: https://github.com/DevRayy/AdventOfCode2022
Thought about doing it in Typescript this year. You can find part1 here and part2 here!
This is how I did it https://gitlab.com/NetTinkerer/aoc-2022/-/blob/main/day1/task1.py I create a list of elves and keep an index of at which elf I am. I keep pushing to that elf as long as the line contains a number. If not a umber I push a new elf to the list and increase the index.
Well, a former Dyalog APL developer did go on to create his own language based on ideas from APL called BQN, which is touted as "an APL for your flying saucer"
(and the repository: https://github.com/mkeeter/advent-of-code/)
My Python solution can be found here.
Inspired by somebody here solving it in CMake, I tried some Bazel misuse. Full solution here. When run, it looks like this:
Deno
Here’s my solution in go 🙂 GitHub
Rust: https://github.com/Japanuspus/adventofcode/tree/master/2022/day01
Algorithms has `max(count:)` now. 💻🖥️
part 1
Kotlin -> [Blog/Commentary] - [Code] - [All 2022 Solutions]
My solution in clojure (with babashka)
C++: https://github.com/dhconnelly/advent-of-code-2022/blob/main/src/day1.cc
First day is always easy, not much explaining to do. Repo at github. Tweet here.
Link Here
Python GitHub
Yeah, look at SuperLinq, specifically the non-async version. :)
Part two is written in three lines of code to not make It completely unreadable. The code is available here.
Full solution
TCL Solution
Elixir https://github.com/HendrikPetertje/advent_of_code_2022/blob/main/test/01/day_1_test.exs
Github Link
Solution on GitHub
""" get_aoc_input(day, cookie) Download Advent of Code 2022 input data for the given day. A valid cookie must be provided, for example by logging into the Advent of Code website with a browser and copying the session cookie (accessible in the browser preferences). """ function get_aoc_input(day::Integer, cookie::AbstractString) cookies = Dict("session"=>cookie) r = HTTP.get("https://adventofcode.com/2022/day/$day/input", cookies=cookies) String(r.body) end ```
C# and Rust: https://gitlab.com/b4ux1t3/advent-of-code/-/tree/2022-day-one/2022
Kotlin day 1
Java day 1: https://github.com/adder12/AdventofCode2022/blob/main/AdventofCode1/src/main/java/org/example/Main.java
Mine Kotlin solution looks mostly the same. IDE suggested to use `maxOfOrNull` and I used slice instead of `take`.
The code is available on github: https://github.com/tpatel/advent-of-code-2022/blob/main/day01.mjs
repo link
This includes: - rust-analyzer as the LSP. It will give you a lot of auto-completions, auto-imports, rename symbol etc. - rust-fmt for formatting. This will let you forget about formatting, and make your code more readable for others. - clippy for linting. Clippy is one of my biggest reasons for liking rust, it's awesome
Java 17 solution: challenges/Day1.java
github
Almost forgot AoC for this year, quickly hacked together the Code before it was past midnight. basic gist of code is:
Full code on Github
I put it on Github if you really want to check it out. Beware that it is not usable if you don't know the limitations.
(not very good) haskell
Trying to use Rust this year: My solution to part 1.
Code: Repo, The part that solves the challenge
github
Link to repo.
This took way too long setting up rust with a formal project structure. https://github.com/IdrisTheDragon/Advent2022/blob/main/day_01/src/lib.rs
Full code is on GitHub
I solved it in Haskell earlier this morning: https://github.com/sondr3/aoc22/blob/main/src/Day/Day01.hs. Pretty straight forward after parsing the input.
Full repo here: https://github.com/bwz3rbot/advent-of-code-2022
C# -> https://github.com/NeelBhatt/AdventOfCode2022/blob/main/Day1
Golang (somewhat experienced): https://github.com/CSS-Scripter/AdventOfCode/blob/main/2022/golang/1/main.go
I'm mostly translating Q in my mind, but the best resource I found for new ones is the Ok's website: https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Manual.md
R https://github.com/jnt0009/advent_of_code_2022/blob/master/day_1/day_1.R
F# - No Sorting, Single Iteration and TypeScript - Old Style
C (nothing special there)
Another Rust solution: https://github.com/Scharrels/summer_of_code_2022/blob/master/src/day1_calorie_counting.rs
Python Solution: Day 1
The code is available on Github of course if you want to check it out, and there's a little bit of documentation covering some of the sequence adaptors and algorithms which are available.
Go solution: https://github.com/JustTalDevelops/aoc2022/blob/master/days/one/main.go
C++
The turtles will tell you all the answers! https://github.com/jdeplecker/CC-AdventOfCode-2022/tree/main/day01
Repo: GitHub
Github Repo
Code
JS: Kept it real old-school Node style today lol https://github.com/lindakatcodes/aoc-22/blob/main/solutions/day01.js
Python solution: https://github.com/chiragpachori/advent_of_code/blob/main/2022/01/solution.py
solution here
Rust: Day 02 Decided to use AoC 2022 to learn some Rust.
Rust: Solution
Solution for day 1: https://github.com/micod-liron/advent-of-code/blob/main/AdventOfCode2022/Day01of2022.class.st
part one
Code: https://github.com/careyi3/aoc_2022/tree/master/solutions/1
@GitHub
Full code here https://github.com/dionysus-oss/advent-of-code-2022/blob/main/day-1/src/main.rs and solution explanation https://youtu.be/i5HXzoyTULU
My solutions in Rust https://github.com/LinAGKar/advent-of-code-2022-rust/tree/main/day1a, https://github.com/LinAGKar/advent-of-code-2022-rust/tree/main/day1b
Here's my solution in C# https://github.com/adhurjaty/AdventOfCode/tree/master/Day2 Went with a circular double linked list because I wanted to prove something I guess
My Repo
Python, my_repo: https://github.com/loramoon/adventofcode.com_game_2022/tree/main/Day_1
Rust, https://github.com/asaaki/advent-of-code-2022/blob/main/src/bin/day1.rs
Adding to the 6 other "excel" users: https://github.com/qqii/adventofcode-2022/tree/master/day01
Solved in C++ https://github.com/osalbahr/adventOfCode Feel free to ask any questions! You can find more C++ solutions (and other languages) here: https://github.com/Bogdanp/awesome-advent-of-code#c-2
github.com/Nrc0/adventofcode2022
https://github.com/gizlu/AoC2022/blob/8ac51696ded741c94900917efe40b108bd66f7a9/day1/README.md awk/shell, one line per task
Tailspin https://github.com/tobega/aoc2022/blob/main/day01/app.tt
GAMEBOY using C + GDK-2020
Python 3
Rust 2022 01
This year I'm going to do as much as possible with scratch:
part 1 on github
Python 3 - Part 1 - Part 2 - Walk-Through Video
Part 1
Day1
C# solution using .NET Interactive and Jupyter Notebook.
I may be a little late to the party but here's my Murmel solution:
Full code on Github