We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Further information. The data comes from "Test Case 1". Here is the graph assuming that u->v is a parent->child edge. But, several have to be swapped for this problem (left as an exercise for the reader). The first image (input1.png) shows the graph before swapping, and it shows multiple roots. Most of the graph is not reachable starting at node 1 (each node shows the node number and the value). The second image (input_oneTree.png) shows the graph you need to build for the HR test to be successful.
Java Visitor Pattern
You are viewing a single comment's thread. Return to all comments →
Further information. The data comes from "Test Case 1". Here is the graph assuming that u->v is a parent->child edge. But, several have to be swapped for this problem (left as an exercise for the reader). The first image (input1.png) shows the graph before swapping, and it shows multiple roots. Most of the graph is not reachable starting at node 1 (each node shows the node number and the value). The second image (input_oneTree.png) shows the graph you need to build for the HR test to be successful.
https://github.com/johnnyski/tc1/blob/main/input1.png https://github.com/johnnyski/tc1/blob/main/input1_oneTree.png