| 
0102
 03
 04
 05
 06
 07
 08
 09
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 
 | 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<Integer> sources() { return null; }
  // sinks
  public Iterable<Integer> sinks() { return null; }
  // is G a map?
  public boolean isMap() { return false; }
} |