AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

This commit is contained in:
Jacob Signorovitch
2025-02-13 10:55:21 -05:00
parent f26b576c99
commit 7ac3142974
3 changed files with 28 additions and 2 deletions

View File

@@ -178,6 +178,7 @@ class BFT<X> implements Iterator<X> {
}
}
/*
class TreeFinder {
// Know the first element of the preorder list will be the root node of the
// tree. Assuming node values are unique, you can then locate that node in
@@ -185,7 +186,6 @@ class TreeFinder {
// subtree, the ones to the right on the right. Repeat the process on the
// subtreees.
// Learned you can do static methods with a type like this :).
static <T> BT<T> find(ArrayList<T> inorder, ArrayList<T> preorder) {
int inorderRootIdx = inorder.indexOf(preorder.getFirst());
System.out.println(inorderRootIdx);
@@ -238,6 +238,7 @@ class TreeFinder {
return new Node<>(val, leftTree, rightTree);
}
}
*/
class Examples {
BT<Integer> tree;
@@ -297,6 +298,7 @@ class Examples {
);
}
/*
void testTreeFinder(Tester t) {
init();
@@ -313,4 +315,5 @@ class Examples {
t.checkExpect(found, tree);
}
*/
}