Emre Akgül
12/11/2023, 2:20 AMFF7FSF7F7F7F7F7F---7
L|LJ||||||||||||F--J
FL-7LJLJ||||||LJL-77
F--JF--7||LJLJ7F7FJ-
L---JF-JLJ.||-FJLJJ7
|F|F-JF---7F7-L7L|7|
|FFJF7L7F-JF7|JL---7
7-L-JL7||F7|L7F-7F7|
L.L7LFJ|||||FJL7||LJ
L7JLJL-JLJLJL--JLJ.L
Or this? (in this case only the pipe is printed, but with the replaced chars)
∙┌┐┌S┌┐┌┐┌┐┌┐┌┐┌───┐
∙│└┘││││││││││││┌──┘
∙└─┐└┘└┘││││││└┘└─┐∙
┌──┘┌──┐││└┘└┘#┌┐┌┘∙
└───┘┌─┘└┘####┌┘└┘∙∙
∙∙∙┌─┘┌───┐###└┐∙∙∙∙
∙∙┌┘┌┐└┐┌─┘┌┐##└───┐
∙∙└─┘└┐││┌┐│└┐┌─┐┌┐│
∙∙∙∙∙┌┘│││││┌┘└┐││└┘
∙∙∙∙∙└─┘└┘└┘└──┘└┘∙∙
https://www.compart.com/de/unicode/block/U+2500Advent of Code 2023 day 11
12/11/2023, 5:00 AMTolly Kulczycki
12/11/2023, 3:24 PMMax Thiele
12/11/2023, 6:41 PMNeil Banman
12/12/2023, 12:51 AMGrid
class and made it quite powerful and flexible. But this year I've really been enjoying using the input String
directly as a virtual 2-D grid. You just need to track the width, after that, you can move around in any direction. The line breaks delineate the left and right sides of (almost) every row. Top and bottom are handled by using getOrNull
. This also handles left of 0 and right of lastIndex
.
Does anyone else prefer working with a 1-D String rather than lines()
or List<List<E>>
?Advent of Code 2023 day 12
12/12/2023, 5:00 AMKsenia Shneyveys
12/12/2023, 11:20 AMAdvent of Code 2023 day 13
12/13/2023, 5:00 AMSafi K
12/13/2023, 4:51 PMJakub Gwóźdź
12/13/2023, 9:02 PMfun part2(input: Input) = input.map { calc(it.repeated(5).trimDots()) }.sum()
seems like a candidate to do the mapping concurrently, so no core is slacking, but no matter if I implement it via java8 .parallelStream, or runBlocking/async/awaitAll, my results are actually worse. in the above example from 40ms sequential to ~70ms in parallel.
Is it to be expected on such small work pieces?
I aim to fit all 50 stars under 1 second total, but we’re merely halfway there and I’m already there 🙂Advent of Code 2023 day 14
12/14/2023, 5:00 AMAdvent of Code 2023 day 15
12/15/2023, 5:00 AMAdvent of Code 2023 day 16
12/16/2023, 5:00 AMAdvent of Code 2023 day 17
12/17/2023, 5:00 AMPaul Woitaschek
12/17/2023, 7:39 AMAdvent of Code 2023 day 18
12/18/2023, 5:00 AMAdvent of Code 2023 day 19
12/19/2023, 5:00 AMAdvent of Code 2022 day 20
12/20/2023, 5:00 AMPaul Woitaschek
12/20/2023, 7:58 AMJonathan Kolberg
12/20/2023, 8:22 AMevgenim
12/20/2023, 1:32 PMAdvent of Code 2023 day 21
12/21/2023, 5:00 AMAdvent of Code 2023 day 22
12/22/2023, 5:00 AMAdvent of Code 2023 day 23
12/23/2023, 5:00 AMAdvent of Code 2023 day 24
12/24/2023, 5:00 AMAdvent of Code 2023 day 25
12/25/2023, 5:00 AMOzioma Ogbe
01/10/2024, 4:26 AMKsenia Shneyveys
02/02/2024, 5:22 PM