edited by
717 views
2 votes
2 votes

A binary search tree contains the values-$1,2,3,4,5,6,7$ and $8.$ The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output?

  1. $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;8\;\;6\;\;$
  2. $5\;\;3\;\;1\;\;2\;\;6\;\;4\;\;9\;\;7$
  3. $5\;\;3\;\;2\;\;4\;\;1\;\;6\;\;7\;\;8$
  4. $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;6\;\;8$
edited by

1 Answer

Answer:

Related questions

2 votes
2 votes
2 answers
1
admin asked Mar 31, 2020
955 views
In binary search tree which traversal is used for getting ascending order values ?InorderPreorderPostorderNone of the options
0 votes
0 votes
0 answers
2
admin asked Aug 28, 2020
475 views
For a periodic signal $v(t) = 30\sin 100t + 10\cos 300t + 6\sin(500t + \frac{\pi}{4}),$ the fundamental frequency in rad/s$100$$300$$500$None of these
0 votes
0 votes
1 answer
3
admin asked Apr 1, 2020
630 views
Which of the following is a desirable property of module?IndependencyLow cohesivenessHigh CouplingMultifunctional
1 votes
1 votes
1 answer
4
admin asked Apr 1, 2020
1,030 views
A decimal has $25$ digits. The number of bits needed for its equivalent binary representation is approximately,$50$$74$$40$$60$