nothe

She's a Nerd!

  • she/her

Knitter, sewist, Seattle Soccer Fan, occasional tech stuff, whatever else tickles my fancy. Cilantro is fine, but pickles are a waste of a perfectly good cucumber.
@nothe@notacult.social


This one was surprisingly simple...

I absolutely wrote a method titled func spreadHumanCooties() so make of that what you will.

PS: Fuck Those Elephants, at least the monkeys are clear about being troublemaking assholes...


So, the underlying question here was "can you walk a tree backwards, while flipping your basic algebraic methods?" And while I passed the first part with flying colors, the second part... eeeh. I'm not SAYING I was doing very basic algebra on my iPad in Procreate, but... well... yeah.

I'm not sure what the efficient way to do this was, my tact was that after I'd read all my monkeys in, and hooked up their dependencies with back-pointers (please do not judge me for these names, it is late, naming is hard, and sometimes fuck it), I spread "human cooties", which marked which branches we would need to "reverse-solve" to get a number for humn to shout. That charted out the path from me -> root, and then I could just tell root to pass the answer he needed back up the cootified path, mutating it as it went.

(https://github.com/nothes/AdventOfCode/blob/ec3419105b8f115aed0a46891accf5aa7fce1513/AoC/AoC/Day%2021/day21.swift)


You must log in to comment.