What is the output of a BFS traversal in a normal binary search tree if the key insert order is 1,2,3,4,5,6,7?

a. 1,2,3,4,5,6,7
b. 7,6,5,4,3,2,1
c. 1,3,5,7,2,4,6
d. 6,4,2,7,5,3,1


a. 1,2,3,4,5,6,7
The output would be in the same order as the input because we end up creating a new right child at every insert. Since BFS traversal processes one level after another, starting from the root, the traversal output is the same as the input.

Computer Science & Information Technology

You might also like to view...

________ may not appear on your screen, but may on another user's screen depending on the screen resolution and size

Fill in the blank(s) with correct word

Computer Science & Information Technology

A box that appears on a slide with dotted or hatch-marked borders where text, charts, tables, or pictures can be placed is called a:

A) placeholder. B) template. C) layout. D) spread.

Computer Science & Information Technology

In the Connection Window, the ____ menu includes options such as press the equivalent of CTRL+ALT+DEL and turn off the virtual machine.

A. File B. Media C. Clipboard D. Action

Computer Science & Information Technology

Which of the following Windows 8.1 versions cannot be a Remote Desktop client?

a. Enterprise b. RT 8.1 c. Pro d. None of the above

Computer Science & Information Technology