graph

graph / Diameter / 0.1.0

README.md
Returns the diameter of a directed graph. The diameter of a graph is the longest distance between any two connected vertices.

Input:
  • A graph represented as a map from vertices (strings) to a list of neighbors (list of strings).