Finished Arrays Sieve
This commit is contained in:
@@ -178,7 +178,6 @@ 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
|
||||
@@ -186,6 +185,7 @@ 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,7 +238,6 @@ class TreeFinder {
|
||||
return new Node<>(val, leftTree, rightTree);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
class Examples {
|
||||
BT<Integer> tree;
|
||||
@@ -298,7 +297,6 @@ class Examples {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
void testTreeFinder(Tester t) {
|
||||
init();
|
||||
|
||||
@@ -315,5 +313,4 @@ class Examples {
|
||||
|
||||
t.checkExpect(found, tree);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user