version.start to end such that nodes named with lowercase letters are visited once, and nodes with uppercase letters can be visited any number of times.Part 1: A network of nodes is defined by a list of lines formatted as such:
2 <-> 0, 3, 4In this case, node
2is connected to0,3, and4and vice versa.How many nodes are in the group that contains the node
0?
Part 1: A tree is defined as such:
node (weight) -> child1, child2, ...node (weight)
Where a
nodealways has a weight, but may or may not have child nodes.
What is the name of the root
nodeof the tree (the node without a parent)?