Doing this one in Rust kicked my ass. I fought with the compiler for three days and never was able to figure out the borrows and pointers. I gave up yesterday and wrote up a solution in Python. Maybe I'll come back to it one day.