-🎄- 2022 Day 8 Solutions -🎄-

This page summarizes the projects mentioned and recommended in the original post on /r/adventofcode

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • AoC

    my personal repo for the advent of code yearly challenge (by Fadi88)

  • advent2022

    I also did it with numpy. https://github.com/moink/advent2022/blob/master/day8/day8.py

  • 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.

  • AdventOfCode

    Here is my oneline solution in JS (Node) for Day 8 part 2 :) Part 1 and other days here : https://github.com/LoicTouzard/AdventOfCode/blob/main/2022/day8/

  • advent

    Solutions to https://adventofcode.com/ (by tsenart)

  • aoc2022

    Java: Code

  • AdventOfCode

  • advent-of-code-2022

    Code is here

  • 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

    Python3, 353/412. Video on its way; I had some recording issues today. Code.

  • advent-of-code

    Python 120/64 GitHub

  • aoc

    Advent of Code (by kevinluo201)

    My Ruby version

  • aoc2022

    Advent of code 2022 (by MarcusDunn)

  • Advent-of-Code

    AoC2022 (by MeixDev)

    Code

  • AdventOfCode2022

    Python (2301/3184)

  • aoc

    Python code

  • Advent-Of-Code-22

    code

  • aoc2022

    🎄 (by jenarvaezg)

  • AdventOfCode2022

    Surprised to see im top 10k today despite taking an hour and 20 https://github.com/Lukeisun/AdventOfCode2022/blob/master/Day8/main.go

  • advent-of-code

    My solutions for Advent of Code challenges. (by sdatko)

    Part1: https://github.com/sdatko/advent-of-code/blob/master/year-2022/day-08/part-1.py Part2: https://github.com/sdatko/advent-of-code/blob/master/year-2022/day-08/part-2.py

  • AdventOfCode2022

    Code

  • Decker

    A multimedia sketchpad

    Part 1 had a massive delay since i found a parser bug, but otherwise this was smooth sailing. Lots of off by ones, and luckily the example output was very helpful with that.

  • AdventOfCode

    C# Solution 29/334

  • aoc2022

    My own personal overengineered helpers to solve AoC problems in Rust (by udoprog)

    Link to repo: https://github.com/udoprog/aoc2022/blob/main/years/2022/src/bin/d08.rs

  • adventofcode

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

    My Scala solution.

  • advent-of-code-ts

    My solutions to AoC puzzles in Typescript (by rogisolorzano)

  • adventofcode

    Answers to Advent of Code (by viceroypenguin)

  • AoC

    Advents of Code in NASM x86_64 assembly (by JustinHuPrime)

    In part 1, I parsed the input, first getting the size of the input (bear in mind I'm challenging myself to assume nothing about the size of the input), then reading it in. I could probably have used loop, lodsb, and stosb to write more concise parsing code. Then, for each cardinal direction, I marked the trees that were visible from that direction, and finally counted the trees that were not visible from any cardinal direction.

  • advent-of-code

    code

  • advent-of-code

    JavaScript, NodeJS https://github.com/raptox/advent-of-code/blob/main/day8.js

  • aoc2022

    Advent of Code 2022 on SCAMP (by jes)

  • advent-of-code

    Advent of Code! (by peckb1)

    Kotlin Day 08 Generic brute force search in each direction from each inner tree until we hit the edge, or found a tree that blocks our view.

  • adventofcode

    Python solutions to Advent of Code puzzles, https://adventofcode.com/ (by fuglede)

    Python3, complex numbers for coordinates, using inf to represent out of bounds.

  • AdventofCode2022

    My answers for Advent of Code 2022 (by poesraven8628)

  • AdventOfCode2022

    2022 https://adventofcode.com/ (by jdvp)

    Day 8 Solution

  • aoc-2022

    Advent of Code 2022 in Rust (by litpho)

  • AdventOfCode

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

    Python (after a couple of false starts where I counted the same tree from several directions) and then one of the most convoluted Google Sheets formulae that I have ever made (See tabs 8.1 and 8.2)

  • AdventOfCode2022

    Took ages, but after some restructuring it's quite ok. [Github Link]

  • adventofcode

    :christmas_tree: Advent of Code (2015-2023) in C# (by encse)

  • AoC2022

    Interesting, very different to my F# solution

  • AoC

    Discontinued Advent of code through out years (by lamdv)

    I try to have the code as clean, commented and well formatted as my sanity allows My solution

  • advent-of-code

    Advent of Code solutions in JS (by leyanlo)

  • AdventOfCode2022

    Advent of Code 2022 C++ Solutions (by JJJJJJJJJJJJJJJl)

    C++

  • AdventOfCode2022

  • advent-of-clojure

    clo clo clo

  • AdventOfCode2022

    Python(GitHub)

  • aoc2022

    I finished refactoring my code (https://github.com/martenhernebring/aoc2022/tree/solution) and found a way to traverse four directions:

  • aoc2022

    Advent of Code, 2022 edition ⭐ (by kwentine)

    Python, looking in all directions, and finding a good use case for the `for..else` construct

  • AdventOfCode

    Hacky solutions for lovely problems (by skarlman)

    Github

  • aoc2022

  • aoc

    advent of code (by razorfog)

  • advent-of-code-2022

    actually publishing my solutions now that they're not redundant...

  • aoc2022

  • playground

    GitHub

  • aoc

    Advent of Code (by ramuuns)

  • advent-of-code-2022

    My solutions to the 2022 Advent of Code as shiny Jupyter notebooks. You can run and interact with the code and the solutions directly from your browser via Binder. (by markusschanta)

    Repo with all solutions as Jupyter notebooks

  • advent-of-code-2022

    🎄 My solutions to Advent of Code 2022. (by v-shenoy)

    Rust

  • AdventOfCode

  • Advent-of-Code

    bad christmas spaghett (by YelovSK)

    Part 1 - used all() for checking.

  • adventofcode-solutions

    🎄 My solutions to https://adventofcode.com/

    C#

  • aoc-2022

    Advent of Code 2022 (by mintopia)

    GitHub

  • aoc

    My solutions to the https://adventofcode.com/ (by vollcheck)

    Aimed for self-explanatory code after making buzz yesterday

  • Advent-of-Code

    A collection of my solutions for "Advent of Code" (by Nuhser)

  • adventofcode

    adventofcode.com solutions (by linl33)

  • aoc2022

    My solutions for Advent of Code 2022 (by tumdum)

    Rust with runtime ~450µs

  • aoc2022

    Trying to solve Advent of Code 2022 in 25 different languages (1 day = 1 language) (by GoldsteinE)

  • advent-of-code

  • aoc2022

    Advent of Code 2022 - my answers

  • AdventOfCode2022

  • advent_c

    All of the advents of code in pure C, without libraries

    C, it's not often that you get to use monotonic stacks, but they're pretty awesome. I think I could clean this up further into a single generic handler and two functions that do the lifting, but I'm not sure that it would be any cleaner or easier to read. [Github]

  • aoc2022-25-in-25

    Advent of Code in 25 languages

    Scala

  • Advent-of-code2022

    C#

  • AoC2022

    Merry Christmas, y'all !!! (by tobstern)

  • NumPy

    The fundamental package for scientific computing with Python.

    My solution in Python for both parts (I used Numpy):

  • advent-of-code

    For following along with http://adventofcode.com/ (by danielsamuels)

    Python without numpy: https://github.com/danielsamuels/advent-of-code/blob/master/year_2022/day_8.py

  • aoc2022

    Discontinued Advent of Code 2022 (by ednl)

    Well, it took me a while to realise that in part 1 you always have to check the whole row or column because a higher tree can come at any point ... And except for skipping the borders, I couldn't come up with any sort of clever optimisation that would help reduce the O(N^2) complexity. It still runs in under 1 ms on a Mac Mini M1 according to hyperfine. Full code 52 lines without space/comments: https://github.com/ednl/aoc2022/blob/main/08.c

  • advent-of-code-2022

    Advent of Code solutions. (by tobyaw)

  • advent_of_code_2022

  • advent-of-code

  • advent-of-code

    V1 - (Single dimensional Vector) https://github.com/anatomic/advent-of-code/blob/main/src/main/scala/year2022/Day08.scala

  • advents-of-code

    🎄🎁 Solutions for the yearly advent of code challenges

  • AdventOfCodeHaskell

    solutions to advent of code problems (by c-coward)

    Haskell. Pretty straightforward to do in point-free haskell, as you can get all the orientations of the grid by applying some list transformations, and after that its some mapped-scan/folding to reduce back to one dimension.

  • C#

  • advent_of_code_2022

    Advent of code 2022 (by HendrikPetertje)

  • aoc2022

    My Advent of Code 2022 solutions, in Rust. (by orlp)

  • aoc2022

    Advent of Code, this time in Deno (by danvk)

  • python_advent_of_code_2022

    solutions for the yearly advent of code 2022 written in python language

    python solution

  • advent-of-code-2022

    Python solutions for Advent of Code 2022's problems. This is done to train with coding problems and learn Python language (by iLukez)

    Python. I'm a newbie to Advent of Code and I'm using it to learn Python. It isn't the more readable solution as I could've used numpy and rotate the list instead of checking Top, Right, Bottom and Left. Also, since I'm new to Python, i'm sure this solution could've been implemented in much more readable ways. Any suggestion is welcome

  • RustLangFun

    My wack at the language voted StackOverFlow's"most loved programming language for five years running"

    Part 1 and 2- Github

  • advent-of-code-2022

    Here's my contribution for today, perhaps a bit shorter than most solutions not focusing on providing one-liners but I tried to avoid repeating loops. My approach of phase 2 might be of interest for you guys.

  • advent-of-code

    Advent of Code solutions (by sonu27)

  • AdventOfCode

    My solutions from https://adventofcode.com (by kc0bfv)

  • aoc-2022-kotlin

    AOC 2022 in Kotlin!

  • advent_of_code

  • advent-of-code

    My solutions to the Advent of Code (by aaronreidsmith)

    Scala. It's ugly, but it works ¯\_(ツ)_/¯

  • AoC2022

    Solutions to the Advent of Code (AoC) 2022 (by gequalspisquared)

  • AoC2022

    My solutions to Advent of Code 2022 https://adventofcode.com/2022 (by PetchyAL)

    Python, maybe not the best solution, but this challenge really threw me for some reason https://github.com/PetchyAL/AoC2022/blob/main/solutions/day8/day8.py

  • AOC-2022

    Advent Of Code 2022 - Solutions (by Dseal95)

    Python solution tried to think of a clever way to do part 2 but it was taking too long. Ended up just searching each direction then finding the first time a tree was >= size.

  • aoc2022

    Code

  • advent-of-code

  • advent-of-code-2022

    Discontinued https://adventofcode.com/2022 in #Rust (by asaaki)

    Current solution uses one Vec (for the lines), which does perform slightly better than if I would use only the original bytes of the input (&[u8]); added a branch with that bytes version if you care to check. Not sure if it's about some cache line friendliness or the mess of iterators.

  • adventofcode2022

    anyway here is my github repo my solutions for all previous days are there too

  • aoc_2022

  • adventofcode

    Advent of Code 🎄 (by markus-k)

  • advent-of-code-rust

    🎄Starter template for solving Advent of Code in Rust.

    I'm using this template. If you are familiar with Rust you could try running my code in this template to see what speeds you get. This is with the --release flag.

  • aoc2022

    Java solution with recursion

  • adventofcode

    Advent of code solutions (by mathsaey)

  • aoc2022

  • AoC2022

    Solutions to Advent of Code 2022 puzzles. (by SwampThingTom)

  • aoc

    Advent of Code (by charliebeckstrand)

    Part 1

  • Advent-Of-Code

    Code + Data Sets for Advent of Code 2022 (by WatchBenGo)

    Part 1

  • advent-of-code-2022-kt

    Day08

  • AdventOfCode2022

    My solutions for AoC 2022 (by narimiran)

  • advent-of-code

    Advent of Code 2021 (by TenViki)

  • AdventOfCode

    My solutions to Advent of Code (by DanaL)

    Today's code

  • aoc-rs

    Rust is fast. I'm down at 80 µs for both parts! Repo

  • advent-of-code-2022

    🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2022 (by timvisee)

    I'm using the guy who does "the entire AoC in less than a sceond"'s timing code, so I assume it's kosher

  • a2tools

    Stuff I write for my Apple //c

    Code for part 1 and part 2; Videos for part 1 and part 2 solving the example 5x5 forest, because no one wants to watch the solving of the 100x100 forest!

  • AdventOfCode2022

    A location for storing Advent of Code solutions (by AlexPTerry)

    Part 1

  • aoc-22

    Here are my solutions for the Advent of Code 2022 (by rogue-kitten)

    Part 1

  • adventofcode2022

    I'm new on Reddit, so I'm not sure what do you mean by old Reddit. Anyways, thank very much for pointing it out. On the other hand, I just updated the comment with a link with the solution. Also, there is other link to the github repo with my solutions.

  • AoC

    Advent of code (by Robtom5)

    rust (link) treated the string as a flattened array and just jumped around using its shape.

  • advent_of_code_2022

    58 LOC including constexpr tests. Github

  • advent-of-code

    Rust and Python solutions for Advent Of Code 2015-2022 (by jgilchrist)

    Rust

  • AdventOfCode2022

    This is my attempt to solve AdventOfCode2022 (https://adventofcode.com/2022/) and learn some Rust (by samoylenkodmitry)

    Rust, first attempt was to use collections-flow syntax, but simple loops were much easier to use https://github.com/samoylenkodmitry/AdventOfCode2022/blob/master/src/day8.rs (also GitHub copilot is good at predicting next part of iterations)

  • Advent-of-Code

    My Advent of Code solutions since 2018 collected in one place (by alex-Symbroson)

    part 1 part 2

  • advent-of-code-2022

    🦆I can't believe I'm doing this again 🦆 (by mrwilson)

  • advent-of-code

    part1

  • Advent-of-code-2022

    This is my repository of AOC solutions done in Elixir (by TheLighthouse36)

    Elixir

  • advent_of_code_2022

    Solutions for Advent of Code 2022 (by ropewalker)

    Rust: https://github.com/ropewalker/advent_of_code_2022/blob/master/src/day08.rs — there are two solutions for part 2, and one of them should be algorithmically better, has fewer iterations, but still runs longer than the naïve solution. And at this point, I am too tired to figure out why this happens.

  • aoc

    Advent of Code 2022 🎄 (by dwhinham)

    Solution: https://github.com/dwhinham/aoc/blob/main/src/day8.c

  • AdventOfCodeCSharp

    Advent of Code Puzzle Solutions in C# (by jbush7401)

  • advent-of-code-2022

    Joel Eisner's completed TypeScript code challenges for "Advent of Code" 2022 (by joeleisner)

  • aoc2022

  • aoc2022

  • ConcursoAoC2022

    Repositorio para la realización del concurso "Advent of Code 2021" de ACM-UPM

    Github

  • aoc

    My Advent of Code solutions (by stonebr00k)

    I made the change. Previous version is here for reference :).

  • aoc_2022

  • adventofcode2022

    Advent of Code 2022! (by rocksoftcode)

    Groovy

  • AdventOfCode

    [Part 1 paste](https://topaz.github.io/paste/#XQAAAQCfBAAAAAAAAAA7mkrvHeIvDZUizuO2LI0KXEPUFLLgeIPRqbv/0boLpBFLWFSVzSOsosoTTCOPvdaoIyVLtar8lYfcl5NX2uQX0BYmomf6kLl9tJtK9gBU9EHZRc5mZjTyQno2McbXnob9u60RUCnJTcHaaoM9WBk71acPHN4ut5TLEy2bA8mqvb/UbaB5xBuEr6M3/ziyMaV/RlJiV9rXHnhdZNEtKImWv6LLZ9/NCGNT/Sz09kUsmxnB645uZiumLTkIEzO4/0sfgPtLie5kZdFkTdXSEI4X1txM5btjZFWZfUAo2SyM1Nqfis3MHtBumskEknnyZWxAiFxwfZO2Qbm8oOpJYRucXKwEnYlUJQE54rcfMUo9Lq5PqlGKV510shoSsH2WVWmWy9I84dQv0vuoYGXmlgWvYfsM7HEQShVXi2Sku7hY/F4WB1XP9Isn+3RVJaYjVVr1b4H7tFhaeFXrPPOdhG3bDVBB4Q2rjRxlyl6MWOUmWNPqjUo/9No5OWDH1ZA+rlfowhB/4FXvzmtaBZeIYiDsnZwgCMjCsl8C9SJot0drI0MZU4SXZigZvTeQ9yaExkgEAzCi2A48X752knqRQ1FJdcj8x07IlEvhzOkBHSvfX0uyoaQ3fN5HoQJ1rd2z5CX/+OzybQ==)

  • Lots of list folding and general munging. Full writeup on my blog and code on Gitlab.

  • day8

    How I learned to love brute force

  • C# on .NET 6.0: Part 1 Part 2

  • adventofcode_php

    PHP - https://github.com/onei2l/adventofcode_php/blob/master/2022/08/index.php (only functions for, count, mb_str_split)

  • advent-of-code

    Solutions for adventofcode.com (by alexandru-dinu)

  • AdventOfCode

    code

  • adventofcode

    Advent of Code (by rasmusfaber)

    Kotlin: https://github.com/rasmusfaber/adventofcode/blob/master/src/main/kotlin/xyz/faber/adventofcode/year2022/day8/day8.kt

  • advent-of-code

    Kotlin, compact solution in 14 lines of code, no cheating (Kotlin standard formatting). https://github.com/MikeEnRegalia/advent-of-code/blob/master/src/main/kotlin/aoc2022/day08.kt

  • AdventOfCode2022

    My solutions to the Advent of Code challenges from 2022. (by MatthewWest)

  • adventofcode

    Advent of code solutions (by SuddenGunter)

    I've also used matrix transponisation in elixir for this day https://github.com/SuddenGunter/adventofcode/tree/main/2022/day8/lib

  • advent_of_code_2022

  • AoC2022

    Advent of Code 2022 (by Zaitox)

    code on github

  • AoC

    C solution

  • Advent-of-Code-2022

    My AoC 2022 Experience (by Phippre)

    Part 1 - Phippre

  • AoC

    AoC attempts (by Galzzly)

    Go/Golang

  • advent-of-code

    My solutions to Advent of Code :) (by ndepaola)

    somewhat compact python solution: https://github.com/ndepaola/advent-of-code/blob/main/years/2022/8/2022_day_8.py i tried to minimise reading lists into memory and unnecessary iterations

  • aoc22

    Here's my Rust solution.

  • AdventofCode

    Advent of Code (by aaftre)

  • adventofcode

  • advent-of-code

    code on Github

  • AdventOfCode

    2022 Advent Of Code team review (by Jackbennett)

    Swift

  • AdventOfCode

  • Advent-of-Code

    Swift. We don't have good types for this. 🤮

  • advent-of-code

  • Dlang bruteforce solution

  • AdventOfCode-rust

    Repo for solutions to advent of code in rust. The purpose is for me to learn the rust language (by TheAce4K)

    Here is my solution if you want to take a look: Solution

  • adventofcode

    Solutions for problems from AdventOfCode.com (by bhosale-ajay)

    F# - Under 60 lines, readable code, higher order function and composition makes it easy to write complex code

  • Misc-DSA-Practice

    Relied on numpy in my Python solution for element-wise array operations.

  • Advent-of-Code-2022-Scala

    Attempting Advent of Code 2022 using Scala 3

    Solution in Scala

  • advent-of-code-2022

    Pretty fast but not short! :) Source code here https://github.com/dionysus-oss/advent-of-code-2022/tree/main/day-8 and a video of me working through the problem https://youtu.be/ImNKpKKWuWo

  • advent-of-code-2022

  • adventofcode2022

    Part1: yes, part2: no. https://github.com/nhofsted/adventofcode2022/blob/main/src/day8.ts

  • AdventOfCode

    C# with a bunch of LINQ: GitHub

  • AdventOfCode

    Here's my code btw, it's pretty lengthy but I believe it does the minimum amount of operations required, someone correct me if I'm wrong. https://github.com/toni-neurosc/AdventOfCode/blob/main/2022/d8/d8.cpp

  • AdventOfCode2022

    My solutions for Advent Of Code 2022 (by akaritakai)

    Java (198 / 869)

  • advent-of-code

    My Advent of Code answers (by tcsullivan)

    Annotated code and Visualization

  • advent-of-code

    Advent of Code solutions in Python (by anissa111)

    Github

  • adventofcode

    Advent of Code challenge solutions (by flwyd)

    The dynamic programming solution was about twice as slow on part 2, and perhaps 50% slower on part 1 (where the initial solution didn't stop when it hit an obstacle).

  • advent-of-code

    Python, which is not my native tongue. Tried to avoid repeating myself but feels like I came up short due to there being 4 different functions that iterate over the forest. Oh well.

  • https://github.com/LinAGKar/advent-of-code-2022-rust/blob/main/day8a/src/main.rs https://github.com/LinAGKar/advent-of-code-2022-rust/blob/main/day8b/src/main.rs

  • AdventOfCode2022

    Python

  • aoc-2022

    Github

  • aoc2022

    My Advent of Code 2022 solutions! (by SourishS17)

  • advent-of-code-solved

    My advent of code, in jq…

    Part 1 - took me most of the day to solve 😢

  • chapel

    a Productive Parallel Programming Language

    Code | Blog Walkthrough

  • AdventOfCode2022

    Here's Day 8 part 1 & Day 8 part 2 as written in awk.

  • AdventOfCode-Day8-TreeHouse

    C# console app that solves the AdventOfCode Day 8 puzzle - TreeHouse

    Code

  • advent-of-code

    Advent of Code puzzles (by KT421)

  • Advent-of-Code

    Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like (by SvetlanaM)

    My solution in Python = https://github.com/SvetlanaM/Advent-of-Code/blob/master/2022/day08/day08.py

  • advent_of_code

    Solutions to programming puzzles on Advent of Code (by Praful)

    Python 3 solution using numpy. I got held up because I assume (but know better) that numpy arrays are [x,y] instead of [row, col], which is [y,x].

  • advent-of-code

    My (incomplete) solutions to the Advent of Code yearly challenges. (by Chrinkus)

    Here's the solution repo and also fruity.

  • fruity

    A C library for creating and working with 2D arrays. (by Chrinkus)

    Here's the solution repo and also fruity.

  • Advent-of-Code

    Exercises from https://adventofcode.com/ (by AritonV10)

  • aoc2022

    My submissions to Advent of Code 2022. Learning Julia for the first time. (by hraftery)

    Julia. Made a lot of silly mistakes - misread problem, off-by-ones, plus some bad indexing and data structures in Julia. All good lessons!

  • Advent_of_Code_2022

    Advent of Code 2022 exercises in PHP (by chipotle)

  • AdventOfCode2022

    my solutions for https://adventofcode.com/ (by iosifsalem)

    Python

  • adventofcode2022

    Python 3: GitHub. Parts 1 & 2. 522 characters including file name, 18 lines, no imports.

  • adventofcode

    My solutions to the Advent of Code challenges (by djotaku)

  • aoc

    KlongPy Advent of Code (AoC) solutions (by briangu)

    Code 8a Code 8b

  • adventofcode

    Python 3.11 Recursive functions with backtracking: full implementation here

  • aoc2022

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts