public List<Object> findFirstNodeNotInTree(String pattern, Tree.Node root) {

        Tree.Node parent = root;
        List<Object> returnList = new ArrayList<Object>();

        for (int i = 0; i < pattern.length(); i++) {
            boolean found = false;
            String stringToCompare = String.valueOf(pattern.charAt(i));
            List<Tree.Node<String, Integer>> children = parent.getChildren();
            for (Tree.Node<String, Integer> node : children) {
                if (node.getData().equals(stringToCompare)) {
                    found = true;
                    parent = node;
                    break;
                }
            }
            if (!found) {
                returnList.add(parent);
                returnList.add(i);
                break;
            }

        }

        return returnList;
    }