Grokking Graph Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Python3 solution fails on test case { nodes = 3, edges = [[0,1],[0,2]] } on Leet...

J

Dec 19, 2022

0

0

Comments
Design Gurus
Design Gurus3 years ago

Probably you have some local changes. The solution is accepted at LC.

The input you suggested works too:

n = 3 edges = [[0,1],[0,2]] Output [0] Expected [0]

J
J 3 years ago

Yep, made a typo -- the solution does work.