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.

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

1 Expert Approved Answer
Step: 1 Unlock

public boolean equals IntTree other return equals this overa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!