Domanda di colloquio di Keeper Tax

Classic algorithm question but can’t remember exactly what