Everpure Interview Question

CS fundamentals, DFS