Domanda di colloquio di Epic

Some algorithm questions, really hard