All AoC 2023 solutions.
Characterise problems and solutions in terms of programming language features and algorithmic requirements, with a view to learning a new language.
All solutions involve reading data from a text file 'input.txt' and string manipulation. More typical ingredients are (data) classes to model small pieces of data with some properties, and typical collections such as lists/arrays, sets and maps. Tasks with 2D grid data use 2D arrays and, if modelled with classes, may also use indexes and operators.
- data 'eightwothree'
- extract numbers, string manipulation, maybe regular expressions
- easy
- data 'Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green'
- classes, maps
- easy
- grid data '467..114..'
- (2d)arrays, classes, index-manipulations
- easy
- data 'Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53'
- classes, sets, maps
- easy
- data 'seeds: 79 14 55 13 // seed-to-soil map: // 50 98 2 // 52 50 48'
- classes, maps, classes, enums, ranges
- easy
- data 'Time: 7 15 30 // Distance: 9 40 200'
- some math (roots)
- easy
- data '32T3K 765' (cards)
- classes, maps
- easy
- data 'AAA = (BBB, BBB)'
- classes, maps, math (gcd,scm), long numbers
- medium (idea)
- data '0 3 6 9 12 15'
- maps
- easy
- grid data '-L|F7'
- (2d)arrays, index-manipulations
- medium (time-consuming, graph properties)
- grid data '...#......'
- (2d)arrays, index-manipulations
- easy
- data '???.### 1,1,3'
- maps, algo (dynamic programming)
- medium/hard (idea)
- grid data '#.##..##.'
- maps, (2d)arrays, index-manipulations
- easy
- grid data 'O....#....'
- maps, (2d)arrays, index-manipulations
- medium (idea)
- data 'rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7'
- maps, hashing
- easy
- grid data '.|.......'
- sets, (2d)arrays, index-manipulations
- easy/medium (time-consuming)
- grid data '2413432311323'
- maps, queues, (2d)arrays, index-manipulations, math (graph)
- medium/hard (graph)
- data 'R 6 (#70c710)'
- maps, classes, math (graph)
- medium/hard (graph)
- data 'px{a<2006:qkq,m>2090:A,rfg} // {x=787,m=2655,a=1222,s=2876}'
- classes, maps, queues, ranges
- easy/medium (complexity)
- data 'broadcaster -> a, b, c // %a -> b'
- maps, queues, classes, inheritance, long numbers, math (gcd,scm)
- hard (complexity)
- grid data '.....###.#.'
- sets, queues, (2d)arrays, index-manipulations, math (graph)
- easy/medium (part 1, graph), very hard (math, quadratic forms, indefinite grid)
- data '1,0,1~1,2,1'
- maps, (3d)arrays, index-manipulations
- easy
- grid data '#.#####################'
- (2d)arrays, index-manipulations, math (graph)
- medium
- data '19, 13, 30 @ -2, 1, -2'
- math (2d, 3d)
- medium (2d), hard (3d, non-linear equations)
- data 'jqt: rhn xhk nvd'
- math (graph)
- medium/had (graph)