Can bst contain duplicates?



Can bst contain duplicates?..

Answer / Ankit Chaturvedi

No, in a typical Binary Search Tree (BST), each node has a unique value. If duplicates are allowed, it ceases to be a binary search tree.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)

1 Answers   Nagarro,


What is abstraction oop?

1 Answers  


What are benefits of oop?

1 Answers  


How do you make derived class as an abstract class?

1 Answers   Convergys, TCS,


What is the purpose of enum?

1 Answers  


Program to read a comment string

1 Answers   IBM,


Why we use classes in oop?

1 Answers  


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


What is overloading and its types?

1 Answers  


how to create thread in java?

17 Answers   IBM, Infosys, Wipro,


what does exactly the linker do?

1 Answers  


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1 Answers   Microsoft, TCS,


Categories