GithubHelp home page GithubHelp logo

tginsberg / advent-2023-kotlin Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 0.0 189 KB

๐ŸŽ„ Advent of Code 2023: Solutions in Kotlin

License: Apache License 2.0

Kotlin 100.00%
advent-of-code advent-of-code-2023 adventofcode adventofcode2023 aoc-2023 aoc-2023-in-kotlin aoc2023 kotlin

advent-2023-kotlin's Introduction

Advent of Code 2023 Solutions in Kotlin

license

This repo is my personal attempt at solving the Advent of Code 2023 set of problems with the Kotlin programming language.

In previous years I have attempted to solve each puzzle on the day they were posted and to blog my solutions. However, given the enormous amount of time that takes, I will not be blogging my solutions this year. I will still attempt to solve each puzzle each day with a nice solution in Kotlin.

Past years, also in Kotlin:

Day Title Blog Link Solution Code Puzzle Text
1 Trebuchet?! Blog/Commentary Code AoC
2 Cube Conundrum Blog/Commentary Code AoC
3 Gear Ratios Blog/Commentary Code AoC
4 Scratchcards Blog/Commentary Code AoC
5 If You Give A Seed A Fertilizer Blog/Commentary Code AoC
6 Wait For It Blog/Commentary Code AoC
7 Camel Cards Blog/Commentary Code AoC
8 Haunted Wasteland Blog/Commentary Code AoC
9 Mirage Maintenance Blog/Commentary Code AoC
10 Pipe Maze Blog/Commentary Code AoC
11 Cosmic Expansion Blog/Commentary Code AoC
12 Hot Springs Blog/Commentary Code AoC
13 Point of Incidence Blog/Commentary Code AoC
14 Parabolic Reflector Dish Blog/Commentary Code AoC
15 Lens Library Blog/Commentary Code AoC
16 The Floor Will Be Lava Blog/Commentary Code AoC
17 Clumsy Crucible Blog/Commentary Code AoC
18 Lavaduct Lagoon Blog/Commentary Code AoC
19 Aplenty Blog/Commentary Code AoC
20 Pulse Propagation Blog/Commentary Code AoC
21 Step Counter Blog/Commentary Code AoC
22 Sand Slabs Blog/Commentary Code AoC
23 A Long Walk Blog/Commentary Code AoC
24 Never Tell Me The Odds Blog/Commentary Code AoC
25 Snowverload Blog/Commentary Code AoC

Copyright ยฉ 2023 by Todd Ginsberg.

advent-2023-kotlin's People

Contributors

tginsberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

advent-2023-kotlin's Issues

Day 17 does not work for all inputs

State(Point2D(0, 0), EAST, 0).apply {

Hi, I struggled to find the correct solution for part 2. I finally gave up and looked at your code. However, your code produced the same wrong result for my input. I then looked around a bit more and finally realized that for my input, the first step is going south and not east! Thus, adding 2 starting steps to the queue solved the issue.
Thus, I would think you need to use something like

listOf(EAST, SOUTH).map { State(Point2D(0, 0), it, 0) }.forEach {
    queue += Work(it, 0)
    seen += it
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.