Test

Blog Forums Programming Test

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #842
    rebelCoder
    Keymaster

    `
    def count_in_degrees(adjacency_dict):
    “””
    Scan every Value (edges) and increment index of every edge by 1.
    Return a list.
    “””
    in_edges = defaultdict(int)

    for edges in adjacency_dict.values():
    for edge in edges:
    in_edges[edge] += 1
    return in_edges
    `

    • This topic was modified 4 years, 10 months ago by rebelCoder.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.