Hi everyone,

Beginner

Java user, first post here:

I need to complete the implementation of two methods...

1) boolean hasNoIncomingEdges that takes in two parameters: G - a Graph object; and v - the integer identifier of a node in G. The methods returns true is v has no incoming edges, and false otherwise. Here's what I have (unsuccessfully tried so far):

I guess what I am trying to do in this solution is refer to the adjacency matrix of G, and iterate through the column to see if any of the values in that column are true (=1).

2) questProgression which takes in a graph (G) and returns a LinkedList topologically sorted. I have been stuck on the first question so I haven't really made any progress here.

Any help or hints would be very much appreciated.