Domanda di colloquio di Bloomberg

how to solve the valid transaction algorithm problem