+ 2

BST Insertion

Hi, i implemented Binary Search Tree Insertion method on my own just based on logic. So, can anyone verify that the code is working fine while inserting and searching( use your own searching method). And also find the time complexity of the code. code link :- https://code.sololearn.com/cMIIc9yW45Jb

22nd Sep 2020, 3:50 AM
Manjit Kumar
Manjit Kumar - avatar
5 ответов
0
I have checked it. It showing errors. Modify the code according to the errors and if you have any doubts, you can ask again. Try it.
24th Sep 2020, 6:47 AM
Kavya
Kavya - avatar
0
Gogireddy Kavya code never gave me error... After debugging.. i just found that... It overwrite few nodes under a specific circumstances.
24th Sep 2020, 7:07 AM
Manjit Kumar
Manjit Kumar - avatar
0
can u try the code which u posted again. i got "reached end of the code and a closing curly brace"
24th Sep 2020, 7:22 AM
Kavya
Kavya - avatar
0
Gogireddy Kavya well... I corrected the code. Now its fine... I had to change whole code.. now it's perfect.
24th Sep 2020, 7:30 AM
Manjit Kumar
Manjit Kumar - avatar
0
Have you saved the code here
24th Sep 2020, 7:35 AM
Kavya
Kavya - avatar