Epic Interview Question

Some algorithm questions, really hard