CSC4520 – HW3 Solved

$ 15.99
Category:

Description

Given this Tree T, answer the following questions:

1 Assuming T is defined in Java, what code do I write to get “sun” back?
2 What will System.out.println(T.getChildren().get(2).getChildren()) output? Be as specific as possible.
3 Given the following code, what will we output for mystery(T)?
public static void mystery(TreeNode<String> node) {
List<TreeNode<String>> children = node.getChildren(); for (int i = 1; i < children.size(); i++) {
TreeNode<String> child = children.get(i); System.out.println(child.getValue()); mystery(child);
}
}

Reviews

There are no reviews yet.

Be the first to review “CSC4520 – HW3 Solved”

Your email address will not be published. Required fields are marked *