Thomas Klausner - domm

Picture of the Day: New vinyl, 2022-01-18

Advent of Code Day 15 to 24, with some gaps

2021-12-31, Perl

A few more days of Advent of Code... Day 15 - Chiton Another path finder, this time with different costs for different paths. This screams for Dijkstra, but for part 1 I still did a more stupid brute force solution using code similar to Day 12 (but using a stack instead of recursion). For part two my brute force solution was too slow, so I ...
more ]

In einer leiwandn Herdn

2021-12-24, Mixtapes

Die Liga der gewöhnlichen Gentleman findet, es ist nett, nett zu sein (01), was ja mal ein schönes / schwieriges Motto ist. 5K HD wollen ein (diesmal akustisches) happy fucking life (02). Molden Resetarits Soyka Wirth stellen fest (bzw covern) da Geisd bin I (03). Anna Mabo ist am werden (04) und findet ohne Dinosaurier alles trauriger (und ...
more ]

Advent of Code Day 9 to 14

2021-12-14, Perl

Five more days of coding adventures! Day 9 - Smoke Basin We need to find "low points" in a two-dimensional map of integers ranging from 0 to 9. For part 1 I used a hash to store the map (with keys like "3_2" for row 3/col 2), and looked in the 4 bordering fields to find lower values (adjusting for corners/borders), I use the classic method ...
more ]

Advent of Code Day 6, 7 and 8

2021-12-08, Perl

Day 6 - Lanternfish Did the first part via an Array, because I was expecting some GoL stuff in Part 2. There wasn't and the Array-based solution would take forever for part 2. So after a bit of thinking (and (for once) not looking at reddit for ideas) I realized that the position of each fish is irrelevant, and we just need to count the fish. ...
more ]