sir how will we determine this?
How will we compute this?
sir i have uploaded the screenshot of question, i was asking. anyways, i am adding it here also
and i want to ask that how can we determine that which sequence is not correct ( referring to the question in screenshot)
In first option 2 is root node, BST will be starting with the right child of root. 399 β 387 β 219 β 266 β 382 β 381 β 278 β 363 respectively. Here all numbers will be examined while searching for 363.
In second option 925 is root node, BST will be starting with the left child of root i.e. 202 β 911 β 240 next key is 912 we cant go for 912 after 240 because we are already in left BST of 911 our key will be surely in left BST of 911. This option is incorrect.
In third option 924 is root node, BST will be starting with the left child of root. Next node is 220 β 911 β 244 β 898 β 258 β 362 β 363 respectively.
In fourth option 2 is root node, BST will be starting with the right child of root i.e. 252 β 401 β 398 β 330 β 344 β 397 β 363.
only text is visible in ur first response
means there is no certain order we have to make a BST by hit and trial from the given options and check which one is not possible�??
β¦i was finding a proper method to make a BST from any given order
yeah ,β¦
I hope Iβve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.