Question: Solve this todo section, problem is based on Data structure and algorithms. package algs 4 2 ; public class MyDegrees { / / TODO: complete

Solve this todo section, problem is based on Data structure and algorithms.
package algs42;
public class MyDegrees {
// TODO: complete the methods
// The constructor may take time proportional to V+E
// The other methods should all take constant time
public MyDegrees(Digraph G){}
// indegree of v
public int indegree(int v){ return 0; }
// outdegree of v
public int outdegree(int v){ return 0; }
// sources
public Iterable sources(){ return null; }
// sinks
public Iterable sinks(){ return null; }
// is G a map?
public boolean isMap(){ return false; }
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!