Our real algo: We save a bunch of objects, but some of then exist in the DB, so you need to intersect what’s in the DB with what’s in memory before saving, except you can never hold all of the db at once.
It should be our real-life test, but it’s too long. It’s our most complicated algo, and honestly it’s very simple in the end. But given all the variables scattered around in a string.contains() (I don’t even look whether the result is correct, I look whether it’s structured for intelligibility and how they debug the off-by-1 errors), I can’t suppose a more complex algo will be done cleanly.
Maybe I’m mot giving them their chance - It might have taken time for me to output clean algorithms.