the value to be five and this is the root so initially root is not null uh color is here okay so i'm saying val is five five's not greater so it'll come to this line correct curl left is not null so curve will come here perfect again comes back the value five is it a greater than kerbal value five is greater than three so this time we will go to the right so car will go here again comes back this time the value five is it a greater than a curve is this it is greater so on the right it's actually else and that's null so what we do is we say curse write curse right why don't you create a new note and answer this value five okay perfect i inserted this valley five once i've done this i'll break the moment i break the root was pointing to the six solid on the root so i have made the new tree and i've returned it as simple as that as what's the time complexity again assuming the binary search three to be height balanced i can say the time complexity to be log base to n okay that's that's what the time complexity indeed will be for a height balanced binary search tree so i hope you've understood the entire explanation as well as the code just in case you did please please please make sure you like this video because it took a lot of efforts to make this entire tree series also if you wish you can definitely drop in a comment that will keep motivating me to make such further series also if you're new to this channel please do consider subscribing because i'm going to bring in such more series in the upcoming future as well with this uh let's wrap up this video let's speed in the next lecture bye don't ever forget
START_INTERACTION_TOKEN i hope you've understood the entire explanation as well as the code just in case you did please please please make sure you like this video because it took a lot of efforts to make this entire tree series also if you wish you can definitely drop in a comment that will keep motivating me to make such further series also if you're new to this channel please do consider subscribing because i'm going to bring in such more series in the upcoming future as well with this uh let's wrap up this video let's speed in the next lecture bye don't ever forget END_INTERACTION_TOKEN