Eightfold interview question

Dsa round had questions on graphs and greedy algorithm