Pergunta de entrevista da empresa Bajaj Markets

Graph problems and one simple array problem