public ArrayList<TreeNode> getChildren(TreeNode root) {
		ArrayList<TreeNode> result = new ArrayList<TreeNode>();
		if (root.left != null)
			result.add(root.left);
		if (root.right != null)
			result.add(root.right);
		return result;
	}