something like bt else followed now if you have seen my binary tree playlist a binary tree can be like this right one and then we can have a left pointed to two then we can have a left pointed to three and this can go on right and if i take such a tree that's basically degenerate tree and i can say the length of the tree the length of the tree appears to be we go off n right and if you do any travis will be pre-order be it in order breathe any traversal the time complexity will end up being big o of n like any search time complexity in binary search tree generally generally i'm not saying always generally in a binary search tree all the heights heights of the tree are login like if you carefully observe if you carefully observe this is not a degenerate tree this is not a degenerate tree so the height of the binary tree is generally kept as log base to n again it's not a necessity but in almost all the cases the questions that we will be doing everywhere the height is always log base to n okay so the height is always kept as log base NUMBER_TOKEN and why if you carefully observe like generally that's the case the height between left sub tree and right subtree is kept as minimal as possible and we make sure that the height doesn't exceeds log base NUMBER_TOKENn why is it kept login in the next lecture when we learn about search in bst uh you will understand that because search in bt is big off and traversal right if you do a search in binary tree that will take you a big offend because you have to do an entire in order or a pre-order or a post order or a level order in order to find out any node x but we can do that in login in binary search tree only because only because i'll give you a hint only because if you carefully observe if i'm looking to find x equal to NUMBER_TOKEN i don't have to actually traverse the entire tree i know this is not equivalent to NUMBER_TOKEN so i end up moving left because NUMBER_TOKEN is smaller than NUMBER_TOKEN i end up moving left so it's kind of a binary search you know everything to the right of NUMBER_TOKEN is greater than NUMBER_TOKEN so NUMBER_TOKEN can never appear on the right so binary search right it can always appear on the left three three is not equivalent to six will it be on the left or right definitely on the right so left it will never be there so we go to the right that's kind of a binary search that we do that's why the name comes up binary search tree because we know either it appears on the left or on the right as simple as that 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 the 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 read in the next lecture bye
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 the 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 read in the next lecture bye END_INTERACTION_TOKEN