Graph Problem in Java

Can anyone help me with a question?

Is it the same as this one?

3 Likes

no it’s different