...

/

Challenge: Calculate the Number of Nodes in a Graph Level

Challenge: Calculate the Number of Nodes in a Graph Level

Given a graph, calculate the number of nodes in a graph at a given level.

Problem statement

Implement a function that returns the number of nodes at a given level starting from a root node of a directed graph.

Try modifying the breadth-first traversal algorithm to achieve ...