Learn
0 day streak

0 of 90 rebuilt today

Clears at midnight
Graph traversalEasy

BFS shortest path

Unweighted graph as an adjacency list g[u] = {v, ...}. Return the number of edges from src to every node, with -1 for unreachable nodes.

Your code0 / 16 lines, 1 decoy to leave out0:00
  1. Tap the first line below, or drag it here.