Question: Write a method called inOrderList that returns a list containing the sequence of values obtained from an inorder traversal of your binary tree of integers.

Write a method called inOrderList that returns a list containing the sequence of values obtained from an inorder traversal of your binary tree of integers. For example, if a variable t refers to reference tree #3, then the call t.inOrderList() should return the list [8, 3, 7, 2, 1] . If the tree is empty, your method should return an empty list.

Reference Tree #2 2 Reference Tree #1 3 4 9. Reference Tree #3 6, 2.

Reference Tree #2 2 Reference Tree #1 3 4 9. Reference Tree #3 6, 2.

Step by Step Solution

3.29 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public List inOrderList List result new ArrayList ... 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!