Fun to work through the solution here, but there’s a few different ways to do the end. I thought some pipelining would be necessary to find optimal, but it turns out there’s just several ways.
I got fairly mentally stuck on the several possible 138s here. Was very hard to break out of my rut and get the 6 cut, even though once I did it, it seemed obvious.