AdventOfCode2021

Day 1

C with goto only, no function calls, no loops, no multiple line if cases, upfront declarations only.

Day 2

Limitation of not using else cases makes any non-trivial condition a mess.

Day 3

Giant label mess. Complex conditions and nested loops make whole code very hard to read. Upfront declarations make handling of variables confusing.

Day 4

fscanf is a mess. It works in misterious ways. Half of the time went for this...

Day 5

Surprisingly fscanf worked fine. Very easy. Part 2 was actually even easier than part 1.

Day 6

Part 1 can be easily brute forced. Stack was too small for potential number of fish so a dynamic allocation was needed. Figured out how to handle errors in a nice way. Part 2 is instant if you use dynamic programming.