3241. Time Taken to Mark All Nodes
3241. Time Taken to Mark All Nodes
Description
There exists an undirected tree with n
nodes numbered 0
to n - 1
. You are given a 2D integer array edges
of length n - 1
, where edges[i] = [ui, vi] indicates that there is an edge between nodes ui and vi in the tree.