Tree

whitehousechef·2025년 5월 30일

If u have n edges, tree MUST have n+1 nodes by defintition

So when initialising graph, u must say len(edges)+1!! not len(edges)!

0개의 댓글