Fluffykitten5075 Fluffykitten5075
  • 02-09-2019
  • Computers and Technology
contestada

Which method of traversing a tree would result in a sorted list for a binary search tree?

Respuesta :

StaceeLichtenstein StaceeLichtenstein
  • 05-09-2019

Answer:

The inorder traversal make a binary search tree sorted.

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 .

Answer Link

Otras preguntas

Rachel and David share 40 biscuits between them in the ratio 2:3, How many biscuits do they each get?
simplify (1/x) + (1/(x+h)
How do I solve for x? X+6x=56
How do I solve for x? X+6x=56
where will you find maximum rate of evaporation - ocean, pond or an aquarium? Give reason to support your answer.
find a common solution for each system of equations: y=3x+5 y=-5x-3
in a parallelogram one angle is 9 times the size of another. find the measures of the angles
The statement, "right angles measure 90 degrees," is an example of: A postulate A definition A theorem A conjecture
Find the length of the radius of the following circle. (x + 2)2 + y2 = 10
A particle travels in a circle of radius 82 cm and with a centripetal acceleration of 4.7 m/s2. How long does the particle take to complete one revolution?