When I watch these tutorials my IQ jumps up about 40 points and I feel like I can do anything. Then I go and try to do some things on my own and amazingly, my IQ drops back down to normal lol.
@@saifullahrahman Pretty good. I am currently in a product security role doing code review, both blackbox and whitebox / crystalbox. I did however have to go and take college courses on the subject, but I do think watching these videos gave me a decent foundation to succeed. Today, i mostly write Python and Powershell, but i review everything from C and C++, to .NET languages, Java and Assembly (x86/x64 and ARM).
Your tutorials are a gold mine, Even though you speak a bit fast but pausing and listening again and looking into the code with comments helps. almost 9 years later still helping
5 years after making the jump to real money development, I still find myself coming to your videos for interview prep...you've done amazing things for a lot of people
I feel like I have been given everything. I have only ever hoped to live a life with meaning. You guys have given me that. All I can do in return is to try and improve and help more people. I can't imagine to this day that I can actually help as many people as you all say that I do. That is a great blessing that I have received :) Thank you for your kind message.
You are quite literally the only UA-cam algorithms channel that I had to slow down. Thats not a bad thing, everything you say when writing the code is so concise that it makes me want to understand it much more
Thank you! This was so much better than the textbook. Also, your production quality is really good. It is nice to learn from someone who spent more than $5 on their microphone. The animations you used to switch between coding and illustrations were great!
Thank you for the request :) There are so many things I could cover it is almost never ending. I have to start android and games next. I'll be getting into more best practices and theoretical topics in the future.
I'm glad you liked it :) I'm doing my best to finish algorithms this month so I can start android at the beginning of next month. I'll try to get the next part up tomorrow
I had a homework on how to do transverses through a tree structure. My teacher never implements code so I can never learned this or really anything else in that class, but I learned this and you did my homework in less than 15 minutes. Thank you so much!
Thank you :) Yes sometimes we need to see something a few times for it to sink in. That is why I cram so much information into each video so that you don't have to waste your time
I'm very happy to hear that I was able to help. We all learn in different ways. My presentation style works better for you I guess? I'm very happy to help :)
Thank you :) I'm fast just because I wanted to be different from the other videos. I'm working to get better at being fast while maintaining a good speed for people to learn.
Man, I know that a lot of people probably thank you on daily basis for your videos teaching us how to code. But i felt like expressing my personal thanks to you. If not for you i probably would have not passed 2 of my Data Structures assignments this semester. So thank you from the bottom of my heart and keep at it.
This topic was rushed in my class and I had great difficulty in understanding what a key was. I'd never seen two data types passed in a constructor for the node. so this was super enlightening. I'm so, so happy I found this video!
I don't normally comment on youtube videos but I just wanted to thank you for these. You're a fantastic teacher and when I'm struggling with topics in my java class I inevitably end up here to get your take on things. Hope you feel appreciated for the work you do.
This is the best video which help viewer learn BST in just 13:47 mins... Duration of video really matters and I think this video was a perfect match for learning BST really very quick... Thank you so much for posting this. It was a great help.
I have 2 classes left in my degree for Information Technology -Networking. I'm practicing as much as possible while working full time. I'm a weak programmer and appreciate this! Almost finished with head first into java book, however my laptop died last night. It was 7 years old.
I went through the same things when I was in college and I know it sucks. I went for a year eating nothing but bulk rice and dried pinto beans :( I think life does that to many of us, but when we make it through we are much better for it. Brighter days are waiting for you. I wish you all the best :)
I've been trying to wrap my head around this concept for a couple of days now, and thanks to your explanation, everything cleared up for me in just a few minutes! Thank you so much!
You're very welcome :) Java does its best to handle the pointer information for you. There actually is no such thing as passing a memory address, but you'll understand it soon since you know C++
Really great videos and I particularly like that they are concentrated and fast. Let the viewer decide what can't be understood and go back to that place and re-watch it, instead of everything being slow and not meaningful to everyone. Great job!
You're a lifesaver, sir. Just know no matter how old these videos get, you're helping more and more students every coming semester with your tutorials :)
The changes are being made to the node objects. Take a look at the node class. It contains leftChild and rightChild. Based on the situation the leftChild and rightChild nodes are edited
Oh my goodness, your video tutorials are BEYOND life saving. You've taught me in 13 minutes what my professor couldn't in an hour. Thanks one thousand times!
From our school, you are a hero. The best advice you can get from a fellow student about this stuff is a reference to your videos champ. #South Africa->Johannesburg The comment comes far. xD :-). Thank you a lot.
Mpho nhlobane Wow that is very cool! I have never traveled and it amazes me that people all over the world watch my videos. Thank you for telling me :)
We check in the code for the while loop whether the node should be placed on the right or the left. Once we no longer have nodes to check against we call return which throws us out of the while loop. That is why we don't have an infinite loop
The problem is that in your constructor, at the very least, if you tried to create a new node that did not fit one of the if expression logic in the first loop, there is nothing that would allow you to iterate or change any values in your if logic for the second loop and so on. Stackoverflow. There has to be some recursive call (using the argument parameter to pass in the next node to focus on) that iterates your focus node to the correct next node in the tree. More simply put. Your constructor will do an infinite loop if it tries to create a leaf past the 2nd branch/from the 3rd branch onwards.
Also, during traversal, there is no mechanism that iterates your focus node back to the parent node. From the root node, recursive calls are made down both branches of the tree. This recursive call repeats at each branch. Once the traversal algorithm reaches a terminal branch aka leaf, it reaches its base case and sends its return value up the call stack. After the calls on that one path are terminated, the calls from a different/right branch begin and so on procedurally. So you can think of several "paths" of method calls happening with each path through the tree. Then once these calls resolve at each of their respective leaves, it is up to your algorithms logic to have ordered them precisely to execute in the order that is lowest to highest or whatever.
You have truly mastered the art of making a concise, knowledge rich tutorial video. Whenever I watch your videos I get inspired to try out the code and it gets me thinking. Thank you once again and looking forward to many more such top quality videos.
Derek you are doing a great job ... My first starting point was your Design pattern videos ... and i feel like your design patterns were best in the business .... This one is a top class tutorial for a beginner who can concentrate on the concept and plain code ... Rather those heavy codes which are available in abundance on internet... Great Job Sir!!
I may not be understanding the question, but each node needs a key value. That is what separates them and makes them distinct from each other. Does that help?
Great! I learned linked lists using your videos , although it took me about 15 watches in between trying to write the code myself to understand it. Wonder how many times I'll be watching this one
Every working environment is different. I was lucky to have a very demanding boss at my first programming employer. He insisted that we all make very detailed sequence diagrams. He also insisted that we write refactored code that was very readable. The ultimate goal is to write code that is readable by anyone. I cover that stuff in my refactoring and object oriented design tutorials
Thanks a lot. It's much better than my teacher. At first it was hard for me, but when i checked the link and watched the Video it became easier, and i learn it so well, and again thank you so much.
GD! Mr. Banas, you just got a subscriber. I have yet to find too many videos with people as efficient and concise with the information. Thank you, I have learned a lot from this one video, but it will not be my last.
Thank you very much :) I think the speed keeps people awake. I'm trusting that I'm working with intelligent people, which all of you guys are. I'm going to get back into theory topics soon. I'd like to solve all the interview questions in one tutorial. That would be fun
Great tutorial! I just have one thing to say, please clarify the difference between BT and BST somewhere in the video because those details are very important to new students who learn by watching such tutorial. Binary Tree: Each node can have up to two children, the values of left and right child can be greater or less than parent. Binary Search Tree: The value of left child is less than or equal to parent and right child is greater than parent.
First, thanks for your cool videos. addNode has a big flaw. You are assigning the new node to 'parent' which is a local variable and will be destroyed after the method is done. The whole while loop doesn't effect the root node at all since we don't have a reference to it.
You are so right!!! No offense to those with accents, after all they speak more than one language, which is one more than I can speak, but I have a hard enough time understanding 0(log N) in English much less in "7-11" !!! lol (I realize that joke dates me, as few people may get the 7-11 reference. But for those that do...:}
Thank you :) Yes I'm not that popular, but that is ok. I tend to make tutorials for people that I assume already know how to program. Most tutorial people tend to talk down to their viewers while I tend to expect them to be intelligent. That's why I really value my community!
Thanks for an awesome video! I'm studying for an interview and this really helped! Quick edit...I didn't get the job but am grateful for your videos. Funny enough, I just had a student try to submit your code for one of his homework assignments. I couldn't help but laugh when I saw and recognized the code.
Also, you have about the best tutorials I have ever seen, I find them to be a bit fast, but then I just watch them more than once. I also like that you provide your code on your website, that helps a lot. I would really like to see more tutorials on more abstract subjects and theory!
Great video! However, I think the small distinction between Binary Search Tree and Binary Tree is that with a BST, it has to be ordered (left side is smaller or equal, right side is greater). These restrictions don't exist on a binary tree. I really enjoyed the series :)
great job thank you very much iam studing economic informatik and this is excactly what our professor is trying to teach us. Of course i didnt understand all of it by watching it first time you need to watch this a couple of times and do it by yourself
Hello DEREK! Thank you so much for existing and sharing videos like this. I have no doubt that you are an angel sent from heaven to clarify Binary Tree. 🥰
Great video sir, but could you explain the recursive calling of the preOrder and Inorder methods? How does the program know to keep traversing the leftside of the tree until it points to null? How would it know to go back up the tree? Thanks!
Remember all the methods are inside each other. It keeps opening new methods until it reaches a method where focusNode is null. Then it finishes, so it pops back out into the method for the node above, prints its value then runs the method for the right child, opening more methods. Once it finds a null it still has to finish all the rest of the code inside the methods above. If this doesnt help, try writing out everything that is going on.
+Anderson Young recursion is a concept that requires a whole other video to explain, you can kinda see the first method is calling smaller methods in side of it, so using brackets to represent the lifeline of the methods it would be something like this. [Root [rleft [rleftleft][rleftright] ] [rright [rrightleft] [rrightright] ] might be hard to understand but the root method doesn't close until all other methods have been completed
Thank you very much Derek, these tree concepts used to terrorize me, but you have explained it so well that its a cake walk. Would be happy if you could provide some more sessions to learn deep about trees and graphs. And also bitwise operator tricks.
Thank you very much :) I'm not sure what you mean by soft copy though? I provide a link to the code in the description for the video. Is that what you meant?
Learn in One Videos for Every Programming Language
Subscribe to Bookmark them: bit.ly/2FWQZTx
C++ : ua-cam.com/video/Rub-JsjMhWY/v-deo.html
Python : ua-cam.com/video/N4mEzFDjqtA/v-deo.html
Java : ua-cam.com/video/n-xAqcBCws4/v-deo.html
PHP : ua-cam.com/video/7TF00hJI78Y/v-deo.html
MySQL : ua-cam.com/video/yPu6qV5byu4/v-deo.html
JavaScript : ua-cam.com/video/fju9ii8YsGs/v-deo.html
C# : ua-cam.com/video/lisiwUZJXqQ/v-deo.html
HTML5 : ua-cam.com/video/kDyJN7qQETA/v-deo.html
CSS3 : ua-cam.com/video/CUxH_rWSI1k/v-deo.html
JQuery : ua-cam.com/video/BWXggB-T1jQ/v-deo.html
TypeScript : ua-cam.com/video/-PR_XqW9JJU/v-deo.html
ECMAScript : ua-cam.com/video/Jakoi0G8lBg/v-deo.html
Swift : ua-cam.com/video/dKaojOZ-az8/v-deo.html
R : ua-cam.com/video/s3FozVfd7q4/v-deo.html
Haskell : ua-cam.com/video/02_H3LjqMr8/v-deo.html
Handlebars : ua-cam.com/video/4HuAnM6b2d8/v-deo.html
Bootstrap : ua-cam.com/video/gqOEoUR5RHg/v-deo.html
Rust : ua-cam.com/video/U1EFgCNLDB8/v-deo.html
Matlab : ua-cam.com/video/NSSTkkKRabI/v-deo.html
Arduino : ua-cam.com/video/QO_Jlz1qpDw/v-deo.html
Crystal : ua-cam.com/video/DxFP-Wjqtsc/v-deo.html
Emacs : ua-cam.com/video/Iagbv974GlQ/v-deo.html
Clojure : ua-cam.com/video/ciGyHkDuPAE/v-deo.html
Shell : ua-cam.com/video/hwrnmQumtPw/v-deo.html
Perl : ua-cam.com/video/WEghIXs8F6c/v-deo.html
Perl6 : ua-cam.com/video/l0zPwhgWTgM/v-deo.html
Elixir : ua-cam.com/video/pBNOavRoNL0/v-deo.html
D : ua-cam.com/video/rwZFTnf9bDU/v-deo.html
Fortran : ua-cam.com/video/__2UgFNYgf8/v-deo.html
LaTeX : ua-cam.com/video/VhmkLrOjLsw/v-deo.html
F# : ua-cam.com/video/c7eNDJN758U/v-deo.html
Kotlin : ua-cam.com/video/H_oGi8uuDpA/v-deo.html
Erlang : ua-cam.com/video/IEhwc2q1zG4/v-deo.html
Groovy : ua-cam.com/video/B98jc8hdu9g/v-deo.html
Scala : ua-cam.com/video/DzFt0YkZo8M/v-deo.html
Lua : ua-cam.com/video/iMacxZQMPXs/v-deo.html
Ruby : ua-cam.com/video/Dji9ALCgfpM/v-deo.html
Go : ua-cam.com/video/CF9S4QZuV30/v-deo.html
Objective C : ua-cam.com/video/5esQqZIJ83g/v-deo.html
Prolog : ua-cam.com/video/SykxWpFwMGs/v-deo.html
LISP : ua-cam.com/video/ymSq4wHrqyU/v-deo.html
Express : ua-cam.com/video/xDCKcNBFsuI/v-deo.html
Jade : ua-cam.com/video/l5AXcXAP4r8/v-deo.html
Sass : ua-cam.com/video/wz3kElLbEHE/v-deo.html
hey thank for the tutorial, it helped me.
I have a doubt. what is the need for parent element, here is my implementation:
public class BinaryTree {
Node root;
public void addNode(int data){
Node newNode = new Node(data);
if(root == null){
root = newNode;
}
else{
Node currentNode = root;
while(true){
if(data
can you explain these declaration please ? Node leftChild , Node rightChild ? how is Node a type ?
When I watch these tutorials my IQ jumps up about 40 points and I feel like I can do anything. Then I go and try to do some things on my own and amazingly, my IQ drops back down to normal lol.
Beacuse these videos are super basic and dont teach you much lol
@@theendurance Yet you are still watching them and replying on comments posted 7 years ago? Ooof....
@@XonicDigifact i wonder how you are doing now. how much programming do you know'
@@saifullahrahman Pretty good. I am currently in a product security role doing code review, both blackbox and whitebox / crystalbox. I did however have to go and take college courses on the subject, but I do think watching these videos gave me a decent foundation to succeed. Today, i mostly write Python and Powershell, but i review everything from C and C++, to .NET languages, Java and Assembly (x86/x64 and ARM).
@@XonicDigifact iam currently out from college, I quite good in java, scala and python. ACC to you ,on which should I focus..
Your tutorials are a gold mine, Even though you speak a bit fast but pausing and listening again and looking into the code with comments helps. almost 9 years later still helping
5 years after making the jump to real money development, I still find myself coming to your videos for interview prep...you've done amazing things for a lot of people
I feel like I have been given everything. I have only ever hoped to live a life with meaning. You guys have given me that. All I can do in return is to try and improve and help more people. I can't imagine to this day that I can actually help as many people as you all say that I do. That is a great blessing that I have received :) Thank you for your kind message.
Thank you Derek.
From me 7 years later.
You are quite literally the only UA-cam algorithms channel that I had to slow down. Thats not a bad thing, everything you say when writing the code is so concise that it makes me want to understand it much more
Thank you for the nice compliment :) I'm the fast tutorial guy I guess
Thank you! This was so much better than the textbook. Also, your production quality is really good. It is nice to learn from someone who spent more than $5 on their microphone. The animations you used to switch between coding and illustrations were great!
Jason Pasimio Thank you for all the nice compliments :) I'm glad you liked the videos.
Thank you for the request :) There are so many things I could cover it is almost never ending. I have to start android and games next. I'll be getting into more best practices and theoretical topics in the future.
I'm glad you liked it :) I'm doing my best to finish algorithms this month so I can start android at the beginning of next month. I'll try to get the next part up tomorrow
I had a homework on how to do transverses through a tree structure. My teacher never implements code so I can never learned this or really anything else in that class, but I learned this and you did my homework in less than 15 minutes. Thank you so much!
Thank you :) Yes sometimes we need to see something a few times for it to sink in. That is why I cram so much information into each video so that you don't have to waste your time
I don't have any questions because you already explain everything truly clearly.
all i wanna say thank you
I'm very happy to hear that I was able to help. We all learn in different ways. My presentation style works better for you I guess? I'm very happy to help :)
Thank you :) I'm fast just because I wanted to be different from the other videos. I'm working to get better at being fast while maintaining a good speed for people to learn.
Man, I know that a lot of people probably thank you on daily basis for your videos teaching us how to code. But i felt like expressing my personal thanks to you. If not for you i probably would have not passed 2 of my Data Structures assignments this semester. So thank you from the bottom of my heart and keep at it.
Thank you for taking the time to tell me I've helped :) I greatly appreciate it!
This topic was rushed in my class and I had great difficulty in understanding what a key was. I'd never seen two data types passed in a constructor for the node. so this was super enlightening. I'm so, so happy I found this video!
I'm very happy that it helped :)
I don't normally comment on youtube videos but I just wanted to thank you for these. You're a fantastic teacher and when I'm struggling with topics in my java class I inevitably end up here to get your take on things. Hope you feel appreciated for the work you do.
Thank yu for taking the time to tell me they help :) I greatly appreciate it
You have no idea how this helped! You explained it better than my lecturer. Thank you.
+Marie J Thank you :) I'm glad I could help
This is the best video which help viewer learn BST in just 13:47 mins...
Duration of video really matters and I think this video was a perfect match for learning BST really very quick...
Thank you so much for posting this. It was a great help.
Thank you for the compliment :) I'm glad it helped
I have 2 classes left in my degree for Information Technology -Networking. I'm practicing as much as possible while working full time. I'm a weak programmer and appreciate this! Almost finished with head first into java book, however my laptop died last night. It was 7 years old.
I went through the same things when I was in college and I know it sucks. I went for a year eating nothing but bulk rice and dried pinto beans :( I think life does that to many of us, but when we make it through we are much better for it. Brighter days are waiting for you. I wish you all the best :)
I've been trying to wrap my head around this concept for a couple of days now, and thanks to your explanation, everything cleared up for me in just a few minutes! Thank you so much!
That's great! I'm happy I could help
You're very welcome :) Java does its best to handle the pointer information for you. There actually is no such thing as passing a memory address, but you'll understand it soon since you know C++
Really great videos and I particularly like that they are concentrated and fast. Let the viewer decide what can't be understood and go back to that place and re-watch it, instead of everything being slow and not meaningful to everyone. Great job!
+Johan O Thank you :) I do my best to make original videos
You're a lifesaver, sir. Just know no matter how old these videos get, you're helping more and more students every coming semester with your tutorials :)
Thank you very much :) It is great to know the videos are helping
Sir, you are my freaking hero. It's so much easier to understand when you see application alongside theory instead of one separated from the other.
hybredmoon I'm very happy that I could help :)
You're very welcome :) I'm happy that I was able to help
The changes are being made to the node objects. Take a look at the node class. It contains leftChild and rightChild. Based on the situation the leftChild and rightChild nodes are edited
Oh my goodness, your video tutorials are BEYOND life saving. You've taught me in 13 minutes what my professor couldn't in an hour. Thanks one thousand times!
+GarraOfTheFunk14 Thank you for the compliment :) I'm very happy that I could help.
From our school, you are a hero. The best advice you can get from a fellow student about this stuff is a reference to your videos champ. #South Africa->Johannesburg
The comment comes far. xD :-). Thank you a lot.
Mpho nhlobane Wow that is very cool! I have never traveled and it amazes me that people all over the world watch my videos. Thank you for telling me :)
Norway checking in ! :)
From Cape Town about to engage in the vid.
one of the best videos to learn how to code up the insert and traversal of a BST. Thanks, Derek.
Thank you for the nice compliment :) I’m happy I could help
Brilliant!!! It took 9 hours for my professor to explain the whole thing. Brilliant! Luckily they teach this one in math class
Thank you very much :) I'm happy I could help
Brother, you just saved my @ss in my Data Structure class. Thank you @Derek Banas, really awesome video.
Thank you :) I'm very happy to be of help
I usually don't bother writing comments but I have to thank you for your awesome and helpful tutorials! Thank you!
We check in the code for the while loop whether the node should be placed on the right or the left. Once we no longer have nodes to check against we call return which throws us out of the while loop. That is why we don't have an infinite loop
The problem is that in your constructor, at the very least, if you tried to create a new node that did not fit one of the if expression logic in the first loop, there is nothing that would allow you to iterate or change any values in your if logic for the second loop and so on. Stackoverflow. There has to be some recursive call (using the argument parameter to pass in the next node to focus on) that iterates your focus node to the correct next node in the tree.
More simply put. Your constructor will do an infinite loop if it tries to create a leaf past the 2nd branch/from the 3rd branch onwards.
Also, during traversal, there is no mechanism that iterates your focus node back to the parent node. From the root node, recursive calls are made down both branches of the tree. This recursive call repeats at each branch. Once the traversal algorithm reaches a terminal branch aka leaf, it reaches its base case and sends its return value up the call stack. After the calls on that one path are terminated, the calls from a different/right branch begin and so on procedurally.
So you can think of several "paths" of method calls happening with each path through the tree. Then once these calls resolve at each of their respective leaves, it is up to your algorithms logic to have ordered them precisely to execute in the order that is lowest to highest or whatever.
You have truly mastered the art of making a concise, knowledge rich tutorial video. Whenever I watch your videos I get inspired to try out the code and it gets me thinking. Thank you once again and looking forward to many more such top quality videos.
Thank you for the compliment :) I'm happy you like the videos
These videos are a godsend
+Philthy Phil Thank you :)
Thank you for taking the time to write a nice compliment :) I very much appreciate that and you're very welcome.
Thank you for the nice message :) i have many more tutorials and a new algorithm tutorial coming soon
You teach better than my professor, honestly thank you so much. Getting through this class wouldn't be the same
Thank you for the compliment :) I'm glad it helped
I am so grateful for these videos, they are perfect for revising. Very clear, concise and most importantly to the point.
Thank you Derek Banas!
Daniel Ball You're very welcome :)
Derek you are doing a great job ... My first starting point was your Design pattern videos ... and i feel like your design patterns were best in the business .... This one is a top class tutorial for a beginner who can concentrate on the concept and plain code ... Rather those heavy codes which are available in abundance on internet...
Great Job Sir!!
I plan on acing my data structures exam later this morning thanks to your clear explanations. Thank you for making these awesome videos!
I wish you the best on your exam. You're very welcome :)
Got a 98 :)
Easily the most easy to follow and helpful tutorial I've seen on this topic, keep up the good work man!
Thank you very much :)
I may not be understanding the question, but each node needs a key value. That is what separates them and makes them distinct from each other. Does that help?
You are the best Derek Banas, thanks for making the lives of students like us much better. God bless you!!!
You're very kind :) May God bless you as well!
Thank you :) I'm happy I could help. All of my videos will always be available for free.
Great! I learned linked lists using your videos , although it took me about 15 watches in between trying to write the code myself to understand it. Wonder how many times I'll be watching this one
I'm happy I could help :) Sorry about the speed.
Yes a C++ tutorial is coming, but I have to cover C first. To make games I need C and C++ and I plan to make a ton of games
Every working environment is different. I was lucky to have a very demanding boss at my first programming employer. He insisted that we all make very detailed sequence diagrams. He also insisted that we write refactored code that was very readable. The ultimate goal is to write code that is readable by anyone. I cover that stuff in my refactoring and object oriented design tutorials
Thanks a lot! I've never been more interested in studying Java outside of class. This will help me get a little ahead of my class.
Thank you :) I'm going to cover graphs and other trees very soon.
Thanks a lot. It's much better than my teacher. At first it was hard for me, but when i checked the link and watched the Video it became easier, and i learn it so well, and again thank you so much.
Thank you :) I'm very happy that I could help
Your videos help me out a lot with projects and exam prep. Thank you so much for doing what you do, you magnificent human being.
GD! Mr. Banas, you just got a subscriber. I have yet to find too many videos with people as efficient and concise with the information. Thank you, I have learned a lot from this one video, but it will not be my last.
Thank you very much for the sub and the nice compliment :)
You are like the God of Data Structures!!! Hats off dude. And thanks a lot for putting this all together.
toString is used to control what is printed to the screen if print is used on an object
Thank you very much :) I think the speed keeps people awake. I'm trusting that I'm working with intelligent people, which all of you guys are. I'm going to get back into theory topics soon. I'd like to solve all the interview questions in one tutorial. That would be fun
Great tutorial!
I just have one thing to say, please clarify the difference between BT and BST somewhere in the video because those details are very important to new students who learn by watching such tutorial.
Binary Tree: Each node can have up to two children, the values of left and right child can be greater or less than parent.
Binary Search Tree: The value of left child is less than or equal to parent and right child is greater than parent.
he did bro
First, thanks for your cool videos. addNode has a big flaw. You are assigning the new node to 'parent' which is a local variable and will be destroyed after the method is done. The whole while loop doesn't effect the root node at all since we don't have a reference to it.
o thank jesus i found a data structures channel on youtube that has an american speaking in the videos
+Tim O Can't understand Indians :P
Ikr!!
You are so right!!! No offense to those with accents, after all they speak more than one language, which is one more than I can speak, but I have a hard enough time understanding 0(log N) in English much less in "7-11" !!! lol (I realize that joke dates me, as few people may get the 7-11 reference. But for those that do...:}
indian drive me mad dude ==' data structures aint hard as the indian =='
public void addNode(int key, string name) {
if (rootNode == null){
rootNode = new Node(key, name);
return;
}
Node currentNode = rootNode;
while(currentNode != null) {
if(key< currentNode.key){
currentNode = currentNode.leftChild
}
else {
currentNode = currentNode.rightChild;
}
}
can anyone review this?
Thank you :) Yes I'm not that popular, but that is ok. I tend to make tutorials for people that I assume already know how to program. Most tutorial people tend to talk down to their viewers while I tend to expect them to be intelligent. That's why I really value my community!
Thanks for an awesome video! I'm studying for an interview and this really helped!
Quick edit...I didn't get the job but am grateful for your videos. Funny enough, I just had a student try to submit your code for one of his homework assignments. I couldn't help but laugh when I saw and recognized the code.
I have exam in like 10 hours, and dude you're saving my ass big time with these tutorials, awesome work.
Nermin Sehic Thank you :) Best of luck on your exam.
Its funny that I'm trying to scroll up the video to check the code again thinking its the IDE :P Good job by the way.. subscribed!
Thank you very much :) That's funny
More than these BinaryTrees, I learnt something more important in life.
You're very welcome :) Im very happy to be able to help
Also, you have about the best tutorials I have ever seen, I find them to be a bit fast, but then I just watch them more than once. I also like that you provide your code on your website, that helps a lot. I would really like to see more tutorials on more abstract subjects and theory!
Thank you :) It is very nice of you to say that.
We appreciate the good lecture, legibility of your codes, as well as Audio/Video quality. Thanks!
Thank you :)
Uni student understanding trees in less than 15 minutes in 2022, rather than from a lecturer. Thank you.
Thank you I'm happy I could help :)
Great video! However, I think the small distinction between Binary Search Tree and Binary Tree is that with a BST, it has to be ordered (left side is smaller or equal, right side is greater). These restrictions don't exist on a binary tree.
I really enjoyed the series :)
I love how you are so multi-talented!
Thank you very much :) I greatly appreciate that compliment!
learning this in 'field' is much better than books or slides, Thank you
elfassi mounir Thank you :) i'm glad I could help
wish I would have watched this before my Google Phone Interview.
This video is simple and clear.
Thank you :)
It is a label of sorts that is unique and is matched to a value
Я сделаю все возможное, чтобы следующая часть понятна. Я надеюсь, что это поможет вам в будущем. Существует всегда что-то новое, чтобы узнать
Thank you :) I'm actually going to pause this tutorial soon. I agree that lately it has turned into me just writing code and I have found that boring
helped in my exam at the last moment.
i just saw the video, and went there and did the program.
Samir dayal singh Great I'm glad I could help :)
You explained everything that my prof explained in 2 hours. Plus I actually understand you better than my prof. How?
They help you pick the right data structures and they teach you how to approach a programming problem. The last reason is probably the most important
I have a link to the code in the description for this video. Sorry if I didn't mention that in the video. I sometimes forget.
What error are you getting?
great job thank you very much iam studing economic informatik and this is excactly what our professor is trying to teach us. Of course i didnt understand all of it by watching it first time you need to watch this a couple of times and do it by yourself
It is just a walk through on how binary trees work. What questions do you have
Hello DEREK! Thank you so much for existing and sharing videos like this. I have no doubt that you are an angel sent from heaven to clarify Binary Tree. 🥰
You are very kind :) It is my pleasure to be able to help.
I'm glad your videos seem to be getting more views lately like they deserve :D
so much better than how my professor explained. Thank you so much!!!:)
So Lee Thank you for the compliment :)
Great video sir, but could you explain the recursive calling of the preOrder and Inorder methods? How does the program know to keep traversing the leftside of the tree until it points to null? How would it know to go back up the tree? Thanks!
Desperately waiting for the same answer.
Remember all the methods are inside each other. It keeps opening new methods until it reaches a method where focusNode is null. Then it finishes, so it pops back out into the method for the node above, prints its value then runs the method for the right child, opening more methods.
Once it finds a null it still has to finish all the rest of the code inside the methods above.
If this doesnt help, try writing out everything that is going on.
+Anderson Young recursion is a concept that requires a whole other video to explain, you can kinda see the first method is calling smaller methods in side of it, so using brackets to represent the lifeline of the methods it would be something like this. [Root [rleft [rleftleft][rleftright] ] [rright [rrightleft] [rrightright] ] might be hard to understand but the root method doesn't close until all other methods have been completed
You're very welcome :) I should have made that part of the video more clear
You're welcome. I'll cover deletion next. Then all the other trees will be covered
Thank you very much Derek, these tree concepts used to terrorize me, but you have explained it so well that its a cake walk. Would be happy if you could provide some more sessions to learn deep about trees and graphs. And also bitwise operator tricks.
Rajlaxmi Katkati You're very welcome :) I'm planning another advanced algorithm tutorial. I hope to get it going soon.
Thank you very much :) I'm not sure what you mean by soft copy though? I provide a link to the code in the description for the video. Is that what you meant?
Thank you :) I'm just happy that I have a nice community! I much prefer having 500 nice people over 10,000 mean people. Thank you for being nice
Yes you are correct
Great I'm glad you found it. I do my best to comment the code.
This helped me massively on a project. You are the man!
Great I'm glad I could help :)
Thank you for leaving the light on for me to do my assignment!
That's funny :)
Wow!! That was amazing! I wish my professor is just as great as you. That was very clear explanation. Thanks a lot!
Thank you :) I'm here for free when ever you need me
I plan on covering it when I get back into data structures in the future