209k views
2 votes
Which method of traversing a tree would result in a sorted list for a binary search tree?

1 Answer

3 votes

Answer:

The inorder traversal make a binary search tree sorted.

Step-by-step explanation:

The algorithm of inorder traversal is

1. Traverse the left subtree.

2. print the data .

3. Traverse the right subtree

In this algorithm left subtree is visited first then it print the data or visit the data and finally it visited Right subtree .

User Niranga
by
4.2k points