Skip to content
0:00 / 0:00

#adventofcode#kotlin#algorithms

Advent of Code 2021 in Kotlin, Day 1: Sonar Sweep

Kotlin by JetBrains

100K subscribers • 61 videos on Hallway

YouTube

Beginner. No background in the topic needed.

8.7K views4 years ago3 recommendations

Programming languagesComputer scienceKotlinAlgorithms

Anton Arhipov solves the Day 1 puzzle of Advent of Code 2021 using Kotlin's windowed and count functions.

In this episode, Anton (twitter.com/antonarhipov) solves the Day 1 puzzle from Advent of Code 2021. The solution turns out to be rather simple – windowed and count functions get the job done. The solution has been published on GitHub: github.com/antonarhipov/advent-of-code-2021 Read the blog post: blog.jetbrains.com/kotlin/2021/12/advent-of-code-2021-in-kot… Project template: github.com/kotlin-hands-on/advent-of-code-kotlin-template Lean more about how to win prizes: blog.jetbrains.com/kotlin/2021/11/advent-of-code-2021-in-kot… #AdventOfCode2021 #Kotlin #AdventOfCode

Why it's here

3 people recommend this

What people say. Pointed to as an official Kotlin solution and a good example of idiomatic Kotlin for beginners.

u/Anisim_1Kotlin teamin r/Kotlin • Recommends

The Advent of Code 2021 in Kotlin, Day 1: Sonar Sweep

u/Plippein r/Kotlin • Recommends

On “Doing AoC in Kotlin and It feels really unintuitive”

I just found Kotlin's official solution for the advent of code, link to this video

u/Soul_Shotin r/Kotlin • Recommends

On “Noob trying to figure this out”

Im happy to hear that you were able to get things working. Learning a new language usually involve trial-and-error, but I promise it's worth it. The documentation is a good place to start. I'd also recommend reading articles from popular sources like Kotlin Academy, watching experts code on the Kotlin YouTube channel, and joining the Kotlin slack (it's far more active than the subreddit). https://kotlinlang.org/docs/home.html https://kt.academy/article link to this video