AoC 2023, Day 11: Cosmic Expansion (Haskell)
Автор: Dmytrish
Загружено: 2023-12-11
Просмотров: 12
Описание:
00:00 - reading Part 1
05:32 - setup
05:55 - thinking, sky map representation
11:47 - parsing
17:15 - more boilerplate^W structure
18:04 - expanding: getting the sky range
21:45 - expanding: fiinding empty rows/columns
28:36 - expanding: sets are O(efficient)
35:38 - expanding: offsets for galaxies
44:23 - debugging off by one in offsets
47:30 - galaxy pairs: wasting time
50:40 - wasting time: oh, a useful helper!
54:20 - galaxy pairs: wasting time
57:40 - unfolding galaxy pairs
1:00:10 - distance calculation
1:04:07 - wasting time: map is not fmap
1:07:48 - debugging correct code
1:09:45 - ...because I did not expand the universe
1:10:10 - part 1 works
1:10:30 - reading part 2
1:10:57 - finding where to put the number
1:13:08: winging it: part 2 works
Some retrospective notes:
finding empty rows/columns was as easy as the set difference from `S.fromList [imin..imax]`
I could use `S.split` to get the number of empty rows/columns for a given row/column
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: