Graph Valid Tree

Preview

You are given an integer n and a list of undirected edges where each entry in the list is a pair of integers representing an edge between nodes 0 and n - 1. You have to write a function to check whether these edges make up a valid tree.

Sign in to read the full chapter.

Checking access…