C3 AI interview question

Graph problem which I have not well prepared.