Question: Write a method called equals that accepts another binary tree of integers as a parameter and compares the two trees to see whether they are
Write a method called equals that accepts another binary tree of integers as a parameter and compares the two trees to see whether they are equal to each other. For example, if variables of type IntTree called t1 and t2 have been initialized, then t1.equals(t2) will return true if the trees are equal and false otherwise. Two empty trees are considered to be equal to each other.
Reference Tree #2 2 Reference Tree #1 1 7. 4 4 Reference Tree #3 2 3 8. 9. 3. 1.
Step by Step Solution
3.43 Rating (178 Votes )
There are 3 Steps involved in it
public boolean equals IntTree other return equals this overa... View full answer
Get step-by-step solutions from verified subject matter experts
