In my book, I'm given BinaryTree t and Node v as my parameter. So, I can traverse the tree by doing like:
static boolean add(BinaryTree t, Node v ) return add(t, t.left(v)) + add(t, t.right(v))
static boolean method (BinaryTree t)
I was wondering how do I traverse the tree? While comparing the values of it's sibling?
I'm just given a "BinaryTree t" as a parameter. I'm not sure how to approach this.