Tristan Brindle
tristanbrindle.com
Tristan Brindle
@tristanbrindle.com
Very fortunate to have the one and only Herb Sutter as a guest speaker at C++ London this evening
June 13, 2025 at 7:12 PM
An all-star lineup discussing contracts for #cplusplus at C++ London
January 20, 2025 at 7:05 PM
I've found the last few days pretty tricky, so #AdventOfCode day 18 was a nice change of pace. Dijkstra's algorithm came up a couple of days ago so I had an implementation ready to go, and then std::partition_point() does all the hard work for part 2. I like this one!
December 18, 2024 at 1:00 PM
A frustratingly vague #AdventOfCode day 14, where we're asked to "find a picture of a Christmas tree" with no absolutely no further details. I solved it by the ingenious method of dumping 10,000 ASCII "pictures" to a text file and searching for "*********". I'm not proud!

At least part 1 was easy.
December 14, 2024 at 4:55 PM
Ah, #AdventOfCode day 13, in which I fail to spot that we're solving a system of two simultaneous equations despite allegedly holding multiple degrees in mathematics AND WRITING THE EQUATIONS DOWN IN FRONT OF ME 🤦‍♂️. I got there in the end though.

github.com/tcbrindle/ad...
December 13, 2024 at 1:06 PM
Exponential growth was the enemy in #AdventOfCode today!

A simple vector was good enough for part 1, but more iterations in part 2 required a different approach. I went for storing the data in a (value, count) hash map, which worked very well. A nice puzzle!

github.com/tcbrindle/ad...
December 11, 2024 at 3:11 PM
A strange #AdventOfCode problem today where you had to solve part 2 in order to get part 1! I'm pretty happy with my solution to this one, runs in ~100µs on my laptop and has my first use of a C++23 recursive lambda.

Github: github.com/tcbrindle/ad...
December 10, 2024 at 4:29 PM
Day 5 of #AdventOfCode felt kinda like cheating once I realised that the rules give us an ordering that we can use as a comparator with sort()/is_sorted().

Using a hash set gives about a 10x speedup versus a sorted vector + binary search, but the latter is plenty fast enough for the problem size
December 5, 2024 at 1:49 PM
Day 4 of #AdventOfCode and we're solving word searches!

Part 1 had me scratching my head for a little while, because I didn't account for the fact that an 'X' can be the root of more than one 'XMAS'. Fortunately part 2 was less tricky.

Code: github.com/tcbrindle/ad...
December 4, 2024 at 3:43 PM
#AdventOfCode day 3 part 1 was super easy thanks to @hanicka.net's amazing CTRE library. And part 2 is pretty lovely using Flux, if I do say so myself...
December 3, 2024 at 3:27 PM
Day 2 of #adventofcode was a little trickier than day 1. There might be more efficient ways but this gets the job done...
December 3, 2024 at 11:22 AM
I'm a bit late to the #adventofcode party this year, but Day 1 was a nice gentle start
December 3, 2024 at 10:09 AM