You are given an undirected tree rooted at node edges of length edges[i] = [] indicates an edge between node
Consider the simple path from root node
Return the number of ways to assign weights to the edges on this path such that the total sum of the edge weights along the path is odd.
Constraints:
edges.length
edges[i] = []
edges represents a valid tree.
You are given an undirected tree rooted at node edges of length edges[i] = [] indicates an edge between node
Consider the simple path from root node
Return the number of ways to assign weights to the edges on this path such that the total sum of the edge weights along the path is odd.
Constraints:
edges.length
edges[i] = []
edges represents a valid tree.