Pergunta de entrevista da empresa Meesho

Leetcode hard problem on graph and dp.