Description
Write a method int countOutgoing(int[][] g, int a) that counts the number of edges connected to the node a as outgoing edges....
Write a method int countOutgoing(int[][] g, int a) that counts the number of edges connected to the node a as outgoing edges. The graph is a directed graph, so this method should only count edges going out from node a.
This method takes 2 parameters, a graph g and the a node. It returns the count of edges that go from another node to a (i.e. incoming) and the edges that go from a to some other node (i.e., outgoing). The graph is represented with an adjancency matrix. Remember the convention is for an edge to be stored in g[row][col], where row represents the source (from) and col the destination (to) of the edge.
Your feedback will appear here when you check your answer.