I am trying to get better at these.
I’m generally putting code for this in this GitHub repo: johncalvinroberts/algos