Question- I think it is a graph problem

please solve the question