I have a map like this, which represents a graph: And I have this class, which creates a rooted tree: My goal is: given a root, I want to convert that graph to a rooted tree. For the example above, using 1 as root, I want the following return: Here’s my code: I’m receiving an empty array from the toRT