Our great sponsors
-
advent-of-code-2021
My solutions for the https://adventofcode.com puzzles (2021) ๐๐ (by ClouddJR)
Link for the lazy: https://github.com/ClouddJR/AdventOfCode2021/blob/c1eb7e4778d867e1edede235511afd600cb5fb0b/src/main/kotlin/com/clouddjr/advent2021/Day03.kt
-
Rust Version
-
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.
-
Very similar approach here! https://github.com/marcodelmastro/AdventOfCode2021/blob/main/Day03.ipynb
-
R language
-
AdventOfCode
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
Python 39/229. Video of me solving. Rough day for me, including accidentally deleting all my code (!) during part 2, and misreading part 2.
-
-
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.
-
Go, 773/974
-
Python (2027/765)
-
-
Pretty easy with Python. Some list comprehension, some count, some join, some int and it's done. Could be more efficient, of course. ๐
-
-
Hi! Nothing special, I might refactor later (since it is very rushed together), but Java 17, if you are interested.
-
Code is here on my Github
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)
My Scala solution.
-
-
Python 3
-
-
Python
-
-
Python 3
-
J solution https://github.com/Toanuvo/Advent-of-code-2021/blob/main/J/day3.ijs
-
JAVASCRIPT https://github.com/TheAngularGuy/aoc2021/tree/master/day3
-
-
My python solution: https://github.com/moink/advent2021/blob/master/day3/day3.py
-
-
-
code
-
-
aoc_ts
Discontinued ๐ Advent of code solutions written in TypeScript for Deno. [Moved to: https://github.com/N8Brooks/deno_aoc]
-
Here's mine: python with numpy
-
-
[Raku](https://github.com/flwyd/adventofcode/blob/main/2021/day3/day3.raku), with refactoring for elegance after some copy/paste.
-
very messy part 1 and I'm embarrassed by part 2, but you can view it on github:
-
-
Elixir https://github.com/maco/advent_of_code/blob/main/2021/elixir/lib/advent_of_code/day_03.ex
-
Python solutions! https://github.com/bluhb/AdventOfCode2021/blob/master/Project/Day3/main.py Not the neatest may be, but they work haha
-
C++ https://github.com/UnicycleBloke/aoc2021/blob/master/day03/day03.cpp. I suspect I'm overdoing the template-y goodness, but it's a learning exercise. Made such a meal of Part 2...
-
c#: github a bit messy but it get the job done.
-
Super messy day 3 in Go: GitHub
-
day03.ts (github.com)
-
-
Cleanup up Rust solution
-
Link
-
My solution using Rust.
-
-
[Python solution] using Counter
-
My C++ solution - it's not really elegant since I never swapped from string to bools but whatever.
-
Python
-
Part 1 & part 2 together
-
-
A bit verbose in Java: https://github.com/FourtyTwoIsTheAnswer/AdventOfCode/blob/main/src/day3/Day3b.java (didn't save 3a)
-
-
-
My solution in elixir (github link) It's not the cleanest fastest solution probably but does the job well enough. Still fighting with language a bit and forgeting some things in it sometimes (first time using it)
-
Kotlin
-
a-ha, recursion! This was a fun one. I wrote my solution in TypeScript: https://github.com/chrismclennon/codegames/blob/master/adventofcode/2021/3/main.ts
-
Today's puzzle required quite a lot of code to solve. IT could have been solved with counting + retain() instead of sorting, but it's a bit less code that way: repo
-
c#, part1 is kinda a mess
-
Elixir, some pattern matching and recursion fun:
-
-
Nice. Here's mine. I retro-actively refactored part 1 to use the parts I created for part 2.
-
-
Python, 26 lines
-
My solution in Kotlin: https://github.com/henningBunk/advent-of-code-2021/blob/main/app/src/main/kotlin/day03/Day03.kt
-
C++: https://github.com/lgeorget/adventofcode2021/tree/main/03
-
advent-of-code
(Work in progress) Python solutions for Advent of Code programming puzzles. (by fedecalendino)
Python Day 03
-
Struggled to get my head around the explanation of part 2 today, need more coffee
-
advent-of-code-scala
Complete 2022 to 2015 entries for the annual Advent of Code challenge, written in concise idiomatic functional Scala.
Scala solution
-
Solution written in Kotlin
-
By far not the cleanest solution, but it works.
-
C# Solution Felt like it was a bit of a sledgehammer approach
-
Full code
-
Here is a solution in rust: https://github.com/Northcode/advent_of_code/blob/master/src/bin/03.rs
-
And of course here's the whole file on the hub of gits.
-
programming-challenges
My attempts at solving various programming challenges. Leetcode, codewars, adventofcode, etc (by x-zvf)
Clojure solution:
-
-
view on github
-
-
-
php
-
Solutions in Julia
-
Typescript: Part 1: https://github.com/Swapnull/advent-of-code-2020/blob/main/2021/day3/part1.ts Part 2: https://github.com/Swapnull/advent-of-code-2020/blob/main/2021/day3/part2.ts
-
Haskell Part 1 (Turned out kinda cool): https://github.com/Oyalmli/adventOfCode/blob/main/2021/day03/day031.hs Part 2 (total mess): https://github.com/Oyalmli/adventOfCode/blob/main/2021/day03/day032.hs
-
Another solution in Java8 https://github.com/mykeesg/aoc2021/blob/main/Day3.java
-
After finishing a more brute force approach for pt2, I made a new version which is about 15x faster, inspired by radix sort. I sort by the bit to the ends of a temp array, then re-apply the algorithm on the end of the array I want. C#
-
-
advent-of-code-2021
Discontinued Trying to solve https://adventofcode.com/ [Moved to: https://github.com/ThePituLegend/advent-of-code] (by ThePituLegend)
-
-
Scala using transpose. Used foldLeft for part 1 and tail recursion for part 2.
-
Solution read as a fixed width file, so that all digits became a separate column. After that it was simple column operations.
-
Python Repo link: https://github.com/SigJig/advent-of-code/blob/master/2021/day_3.py
-
Python ` โ from collections import Counter
-
advent2020
Advent of Code 2020 solutions that optimise effort, tastefulness and brevity in roughly that order (by combatopera)
-
Advent-of-Code
My repository for holding my solutions to the Advent of Code challenges. More info: https://adventofcode.com/ (by MichaelRol)
Source code
-
GitHub link to both parts, commented.
-
-
Code on Github
-
src
-
-
Part 2 was a little messy
-
-
C# solution: https://github.com/jasonincanada/aoc-2021/blob/main/AdventOfCode/AdventOfCode.CSharp/Day03.cs
-
Link
-
-
Overly complicating things a little bit: https://github.com/Renkon/AdventOfCode/blob/main/Problems/Problem3.cs
-
-
-
-
Bundled as a package
-
My solutions using both Python and Golang (a little messy but currently learning Go)
-
Here is the code, if anyone wants to take a look. I'm especially interested if it is possible to obtain keep (line 37) in a simpler way.
-
I solved it manually in Excel this morning :) Anyway, here's my Rust solution: https://github.com/ropewalker/advent_of_code_2021/blob/master/src/day03.rs โ I am not proud of it, but at least it works and is reasonably fast.
-
[Go](https://github.com/rileythomp/aoc/blob/master/solutions/2021/day3/main.go)
-
Python / Jupyter notebook
-
For the event this year I started making a separate C library for all the tools I figured I'd need. On day 3 I'm already exposing flaws in my APIs..
-
My solution in Rust. Hope the Rust gods can forgive me: solution
-
Kotlin -> https://github.com/sticreations/Advent_Of_Code_2021/blob/master/src/main/kotlin/binaryDiagnostic/binarydiagnostic.kt
-
My solutions part one and two in Python: https://gitlab.com/-/snippets/2216011
-
Kotlin: https://github.com/cylab/advent-of-code-2021/tree/main/src/test/kotlin/day3
-
Not a fan of my solution but here it is. (It seems rather unwieldy.)
-
Python 3 solution
-
Python 3 solution (with NumPy)
-
part 1 (really easy in sql)
-
Hereโs my version, using fairly straightforward Haskell98: https://github.com/PhilArmstrong/AdventOfCode-2021/blob/main/03/03.hs
-
-
Ugly but somewhat fast code: https://github.com/jeremylt/advent2021/blob/main/src/day03.rs 46.497ยตs (std dev 5.506) locally, 117.632ยตs (std dev 25.638) on repl.it
-
A Python solution I liked to write but still thinking there's an ultimately elegant way to do it.
-
Kotlin code
-
Python
-
link
-
solution
-
Common Lisp (link)
-
๐ฆ repo for day 3
-
Python 3 Recursion
-
Python Jupyter Notebook
-
My fish shell solution and accompanying gist:
-
Here's mine https://github.com/benc-uk/aoc-2021/blob/main/day-3/main.go
-
Part 2's not as pretty: GitHub
-
I only had time to look at today problem 10 minutes ago. Part 1 in Rust is here. I got a O(m*n) time complexity here (m is the number bitstring length, n is the number of bitstrings). I'm pretty sure there is a better way. Any insights?
-
rust solution
-
Thank you! It was a bug in my Emacs Lisp implementation of topaz's URL scheme.
-
-
Another Haskell one :: GitHub
-
Haskell: https://github.com/bamartindev/aoc2021-haskell/blob/main/src/Solutions/DayThree.hs
-
C: https://github.com/slyfoxza/asmvent-of-code/tree/main/2021-03 (while the idea is to actually do all of this in x86-64 and AArch64 assembly, I start off with C reference implementations)
-
-
Or how to over-engineer a simple thing with contracts and strict typing.
-
-
-
-
part 2, pandas B-D
-
-
-
too mentally exhausted at the moment to golf part 2
-
Publishing only first part in *Clojure* as I'm still working on the 2nd part. Hard exercise, but full of things to learn.
-
Python
-
My solution in Python. Not the most efficient but it get's the job done. This one was fun and interesting!
-
Part 1
-
Rust version https://github.com/rengare/aoc2021/blob/main/day_3/src/main.rs
-
Kotlin solution for day 3, not the most concise nor most optimized but gets the job done and fairly readable.
-
- Implementation: https://github.com/feedm3/advent-of-code-2021/blob/main/src/main/java/me/dietenberger/Day3.java
-
-
APL solution: Github
-
Still don't know the language pretty well, so here is me trying weird syntax and functions lol Here on Github.
-
-
github
-
github
-
Python 3.8 solution It really took me a while for the second part. It's fast, {I feel it can be improved. Any comments would be appreciated
-
part 2
-
GitHub
-
-
Python solution. Complicated enough that today I'm not doing any other languages, just Python.
-
Rust
-
-
All solutions on GitHub.
-
Rust solution without external lib:
-
Readable type focused F# and TypeScript Solution, F# code under 50 lines for both the parts
-
C# https://github.com/wbratz/adventofcode/tree/master/day3
-
My Kotlin solution for Day 3. I'm not particularly proud of this solution as I feel that I may have missed something working with binary numbers and may have brute forced a bit in some parts. But at least I had the opportunity to use Kotlin script for the first time ever (inspired by some other user that posted a solution on Day 2 using it) and some cool lambdas to encapsulate bit criteria logic, all while staying immutable and using recursion instead of loops. :D
-
R: Code Julia: Code
-
Python solution (both parts), tried to document everything as well as I can
-
solution using python3 w/ numpy
-
-
Finally got around to finishing part 2 of my Raku solution. See GitHub for the code.
-
part1+2 : https://github.com/ithar14/AdventOfCode21/blob/main/2021/Day3.py
-
GitHub: Part 1 & 2
-
-
Full code is available here
-
-
-
-
Using a little framework I made for input parsing and tests last year.
-
Here is mine, I abused extension functions and repeated some code. Any suggestions are welcomed.
-
ABAP Github While I found an easy way to convert a binary number string to an int, ABAP doesn't allow bit operations on ints but only on variables with type x or xstring. To apply a NOT/XOR to the int, it has to be converted to type x, XORed and converted back to an int. Fortunately with the ABAP version in SAP NetWeaver 7.50 conversion can be done inline.
-
-
Part 1 went fairly easily - I realized that the least common bits must have been the inverse of the most common bits.
-
Advent-Of-Code-2021
๐ My implementation of the puzzles for Advent of Code 2021, done as a Swift Playground. ๐คถ (by jakehawken)
-
Advent-Of-Code-2021
Discontinued My solutions to the programming puzzles from https://adventofcode.com. (by TommyMynnSon)
-
GitHub/DiagnosticsTool.java
-
-
Another Python3 Implementation :)! Link to Github
-
-
-
see my version: Github/BinaryDiagnostic
-
source code
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives