Given a weighted directed graph and a source node, find the shortest distance from source to all other nodes.
Input: graph = {0: [(1,4),(2,1)], 1: [(3,1)], 2: [(1,2),(3,5)], 3: []}, src=0
Output: {0:0, 1:3, 2:1, 3:4}Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features