Again I came here after not understanding the concept in another video and yes, Tim never disappoints me.. His video was clear and it's even easy for beginners like me to grasp the code.. Thanks million..!
Dude, this video is pure gold. I'm trying to really get into algo and data structure and this is clearing up so many things for me ! It deserves way more views !
The insertion time to the tree is log(n) only if the tree is balanced, If you insert a set of numbers are in increasing (or decreasing) order, you end up with a binary tree that has a height of (n)
If you are coming to the idea of a BST for the first time there is something you need to know. The idea is to take a piece of information like a surname, and convert it to a unique number. You do this with a 'hash function'. That number is the 'key' associated wtih that piece of data. The data is then inserted into a BST in the way described by Tim. Now if you want to search for a name, you obtain the'key' by hashing the name you want to search for. Using that 'key' you can swiftly search the BST and get the information associated with the key.
In the add() function, aren't we supposed to declare current = self.ptr_to_root? Because, otherwise how can we use it the way we have? It is not defined at all. Please explain me If I am wrong! Wanting to learn.
The implementation of "add" will fall into a linked list if the elements are inserted in perfect order. So the time complexity will degrade to O(n), which is not log(n) anymore.
I think code for traversing is wrong... You are not handling the None case, like when we reach the end of the tree, we cannot print any thing like node.value.. please have a look
how are you getting the value from current if current isn’t connected to the node in any way, current should be an empty variable because you didn’t do assign anything to it
can you please post some videos on data structure and algorithms using python (BST,heaps,sorting,dijkshtra algorithm,bellman ford algorithm, prims and kruskals algorithm , graph algorithms etc)
I could not understand the "current" argument passed. You seem to talk more and demonstrate with example very less. I expected a better tutorial from you.
How do we call the function ? BST=BinarySearchTree() BST.add(5) BST.add(8) BST.add(7) BST.add(12) BST.add(1) BST.add(10) BST.add(2) I did this and I am unable to get the required results I am getting an error "ST.add(5) TypeError: BinarySearchTree.add() missing 1 required positional argument: 'value' " Somebody please help me with this
Again I came here after not understanding the concept in another video and yes, Tim never disappoints me.. His video was clear and it's even easy for beginners like me to grasp the code.. Thanks million..!
Dude, this video is pure gold. I'm trying to really get into algo and data structure and this is clearing up so many things for me ! It deserves way more views !
Couldn´t have said it better, fantastic video
Tim please continue making these long videos. I love the in-depth knowledge
This is the best thing because they're teaching me same thing in my current semester,
So thankful of youtubers like you. Thank you so much I get it now.
The insertion time to the tree is log(n) only if the tree is balanced, If you insert a set of numbers are in increasing (or decreasing) order, you end up with a binary tree that has a height of (n)
Very simple and precise explanation.
I finally understand how to implement BST in code. Thank you! Keep making videos. I will enjoy watching the next video about BST.
To all the viewers for the first time, as a matter of fact this made my life easier by one more step.
Great presentation, easy and to the point!
This video is just wow.. Thank you.. no one could have explained this better
Just yesterday I was thinking about your videos on Data Structure. Thanks
If you are coming to the idea of a BST for the first time there is something you need to know. The idea is to take a piece of information like a surname, and convert it to a unique number. You do this with a 'hash function'. That number is the 'key' associated wtih that piece of data. The data is then inserted into a BST in the way described by Tim. Now if you want to search for a name, you obtain the'key' by hashing the name you want to search for. Using that 'key' you can swiftly search the BST and get the information associated with the key.
Thanks so much Tim! I've been having problem solving a challenge pertaining to BST, but this video helped me out!
Keep the good flag flying!💖
In the add() function, aren't we supposed to declare current = self.ptr_to_root? Because, otherwise how can we use it the way we have?
It is not defined at all.
Please explain me If I am wrong!
Wanting to learn.
You're right!
Please do segment trees with their implementation!
Awesome video, so easy to understand the concept. Helped me with my assignment. Thank you.
Thank You
Great Explanation. Thank you so much
It would be great if you show output as well.
The implementation of "add" will fall into a linked list if the elements are inserted in perfect order. So the time complexity will degrade to O(n), which is not log(n) anymore.
Tim I can't thank you enough!!!
Thank you
Thank you for your work! It is really good explanation allowing to get known and understood the foundation
we need these type of vids back
Please make a full Python DSA and DP ..There isnt any currently on RUclips in python language.
what a king , thx brother luv from Turkey!!!
Amazing explanations!!!
I think code for traversing is wrong... You are not handling the None case, like when we reach the end of the tree, we cannot print any thing like node.value.. please have a look
Very helpful, thank you!
how are you getting the value from current if current isn’t connected to the node in any way, current should be an empty variable because you didn’t do assign anything to it
NICE VIDEO THANKS FOR TEACHING
Then if the Node to add is equal to the root node will it go to the right side of the tree?
Bro?? Are these 7 videos in the playlist enough to learn data structure?? It's been 1 year now,
can you please post some videos on data structure and algorithms using python (BST,heaps,sorting,dijkshtra algorithm,bellman ford algorithm, prims and kruskals algorithm , graph algorithms etc)
Love your videos. Keep em coming.
Suggestion: I am trying to digest git. Could u plz do a post on that?
Already have one on it
Are you going to teach other data structure and algorithms in the future
itd be great if you make a video talking about the topics youre studying at school
Awesome,
Looks like you are learning data structures in your college :D
You are awesome! ❤️
no, you're awesome!
Great tourial
Pretty much interesting
made all videos on data and algo
Data structures master? New videos :)
your code doesnt work I tried to implement it nothing is working
So clear. Noice
It’s demetri
which gamer chari do you use¿?
I'm having trouble instantiating the tree lmao. Can anyone help?
I want to learn python .....and I know all the basics.....so what should I to do next to become a good python programmer ??
Depends on what kind if programmer you want to be (web developer, game developer, etc)
@@riyan3704 Data Scientist and web developer.
@@riyan3704 game developer
@@tusharagrawal7511 Well, then you should learn pygame, also game dev needs knowledge of geometry and trigonometry
@@riyan3704 why trigonometry lol
I could not understand the "current" argument passed. You seem to talk more and demonstrate with example very less. I expected a better tutorial from you.
How do we call the function ?
BST=BinarySearchTree()
BST.add(5)
BST.add(8)
BST.add(7)
BST.add(12)
BST.add(1)
BST.add(10)
BST.add(2)
I did this and I am unable to get the required results
I am getting an error "ST.add(5)
TypeError: BinarySearchTree.add() missing 1 required positional argument: 'value' "
Somebody please help me with this
You did not add the "current" value in the add method
Great explanation. Thank you very much!