code: public Map<V, Integer> inDegree() {
          Map<V, Integer> result = new HashMap<>();
          for (V vertex : neighbors.keySet()) {
              result.put(vertex, 0); // all in-degrees are 0
          }
          for (V from : neighbors.keySet()) {
              for (V to : neighbors.get(from)) {
                  result.put(to, result.get(to) + 1); // increment in-degree
              }
          }
  
          return result;
      }
docs: Report (as a Map) the in-degree (the number of head ends adjacent to a vertex) of each vertex.