Java Binary Search Tree

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024

ความคิดเห็น • 716

  • @derekbanas
    @derekbanas  5 ปีที่แล้ว +20

    Learn in One Videos for Every Programming Language
    Subscribe to Bookmark them: bit.ly/2FWQZTx
    C++ : th-cam.com/video/Rub-JsjMhWY/w-d-xo.html
    Python : th-cam.com/video/N4mEzFDjqtA/w-d-xo.html
    Java : th-cam.com/video/n-xAqcBCws4/w-d-xo.html
    PHP : th-cam.com/video/7TF00hJI78Y/w-d-xo.html
    MySQL : th-cam.com/video/yPu6qV5byu4/w-d-xo.html
    JavaScript : th-cam.com/video/fju9ii8YsGs/w-d-xo.html
    C# : th-cam.com/video/lisiwUZJXqQ/w-d-xo.html
    HTML5 : th-cam.com/video/kDyJN7qQETA/w-d-xo.html
    CSS3 : th-cam.com/video/CUxH_rWSI1k/w-d-xo.html
    JQuery : th-cam.com/video/BWXggB-T1jQ/w-d-xo.html
    TypeScript : th-cam.com/video/-PR_XqW9JJU/w-d-xo.html
    ECMAScript : th-cam.com/video/Jakoi0G8lBg/w-d-xo.html
    Swift : th-cam.com/video/dKaojOZ-az8/w-d-xo.html
    R : th-cam.com/video/s3FozVfd7q4/w-d-xo.html
    Haskell : th-cam.com/video/02_H3LjqMr8/w-d-xo.html
    Handlebars : th-cam.com/video/4HuAnM6b2d8/w-d-xo.html
    Bootstrap : th-cam.com/video/gqOEoUR5RHg/w-d-xo.html
    Rust : th-cam.com/video/U1EFgCNLDB8/w-d-xo.html
    Matlab : th-cam.com/video/NSSTkkKRabI/w-d-xo.html
    Arduino : th-cam.com/video/QO_Jlz1qpDw/w-d-xo.html
    Crystal : th-cam.com/video/DxFP-Wjqtsc/w-d-xo.html
    Emacs : th-cam.com/video/Iagbv974GlQ/w-d-xo.html
    Clojure : th-cam.com/video/ciGyHkDuPAE/w-d-xo.html
    Shell : th-cam.com/video/hwrnmQumtPw/w-d-xo.html
    Perl : th-cam.com/video/WEghIXs8F6c/w-d-xo.html
    Perl6 : th-cam.com/video/l0zPwhgWTgM/w-d-xo.html
    Elixir : th-cam.com/video/pBNOavRoNL0/w-d-xo.html
    D : th-cam.com/video/rwZFTnf9bDU/w-d-xo.html
    Fortran : th-cam.com/video/__2UgFNYgf8/w-d-xo.html
    LaTeX : th-cam.com/video/VhmkLrOjLsw/w-d-xo.html
    F# : th-cam.com/video/c7eNDJN758U/w-d-xo.html
    Kotlin : th-cam.com/video/H_oGi8uuDpA/w-d-xo.html
    Erlang : th-cam.com/video/IEhwc2q1zG4/w-d-xo.html
    Groovy : th-cam.com/video/B98jc8hdu9g/w-d-xo.html
    Scala : th-cam.com/video/DzFt0YkZo8M/w-d-xo.html
    Lua : th-cam.com/video/iMacxZQMPXs/w-d-xo.html
    Ruby : th-cam.com/video/Dji9ALCgfpM/w-d-xo.html
    Go : th-cam.com/video/CF9S4QZuV30/w-d-xo.html
    Objective C : th-cam.com/video/5esQqZIJ83g/w-d-xo.html
    Prolog : th-cam.com/video/SykxWpFwMGs/w-d-xo.html
    LISP : th-cam.com/video/ymSq4wHrqyU/w-d-xo.html
    Express : th-cam.com/video/xDCKcNBFsuI/w-d-xo.html
    Jade : th-cam.com/video/l5AXcXAP4r8/w-d-xo.html
    Sass : th-cam.com/video/wz3kElLbEHE/w-d-xo.html

    • @SandeepSharma-sr4rj
      @SandeepSharma-sr4rj 5 ปีที่แล้ว

      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

    • @meassurendra
      @meassurendra 3 ปีที่แล้ว

      can you explain these declaration please ? Node leftChild , Node rightChild ? how is Node a type ?

  • @XonicDigifact
    @XonicDigifact 11 ปีที่แล้ว +217

    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.

    • @theendurance
      @theendurance 4 ปีที่แล้ว +2

      Beacuse these videos are super basic and dont teach you much lol

    • @XonicDigifact
      @XonicDigifact 4 ปีที่แล้ว +18

      @@theendurance Yet you are still watching them and replying on comments posted 7 years ago? Ooof....

    • @saifullahrahman
      @saifullahrahman 4 ปีที่แล้ว

      @@XonicDigifact i wonder how you are doing now. how much programming do you know'

    • @XonicDigifact
      @XonicDigifact 4 ปีที่แล้ว +8

      @@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).

    • @uppalaadarsh3261
      @uppalaadarsh3261 4 ปีที่แล้ว +1

      @@XonicDigifact iam currently out from college, I quite good in java, scala and python. ACC to you ,on which should I focus..

  • @anb4351
    @anb4351 3 ปีที่แล้ว +5

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +5

    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.

    • @GabrielTobing
      @GabrielTobing 3 ปีที่แล้ว +1

      Thank you Derek.
      From me 7 years later.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +2

    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.

  • @d3athlygh0st
    @d3athlygh0st 11 ปีที่แล้ว +2

    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!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +4

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +5

    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.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +9

    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 :)

  • @fc6827
    @fc6827 3 ปีที่แล้ว

    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

  • @Jpasimio
    @Jpasimio 10 ปีที่แล้ว +45

    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!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +7

      Jason Pasimio Thank you for all the nice compliments :) I'm glad you liked the videos.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +2

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    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++

  • @patowazhir
    @patowazhir 8 ปีที่แล้ว +38

    Brother, you just saved my @ss in my Data Structure class. Thank you @Derek Banas, really awesome video.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว +9

      Thank you :) I'm very happy to be of help

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +2

    You're very welcome :) I'm happy that I was able to help

  • @a_stray_dog
    @a_stray_dog 8 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      That's great! I'm happy I could help

  • @SoroushArghavan
    @SoroushArghavan 8 ปีที่แล้ว +5

    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.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    Thank you :) I'm going to cover graphs and other trees very soon.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @nebilgokdemir4527
    @nebilgokdemir4527 4 ปีที่แล้ว

    I don't have any questions because you already explain everything truly clearly.
    all i wanna say thank you

  • @jamesthompson9280
    @jamesthompson9280 6 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      I'm very happy that it helped :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I'm happy I could help. All of my videos will always be available for free.

  • @sarrahwilson8149
    @sarrahwilson8149 7 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว +1

      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 :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you for taking the time to write a nice compliment :) I very much appreciate that and you're very welcome.

  • @KydroxHD
    @KydroxHD 7 ปีที่แล้ว

    You are quite literally the only TH-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

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the nice compliment :) I'm the fast tutorial guy I guess

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

    • @mikelk124
      @mikelk124 10 หลายเดือนก่อน

      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.

    • @mikelk124
      @mikelk124 10 หลายเดือนก่อน

      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.

  • @norcal6181
    @norcal6181 8 ปีที่แล้ว +17

    These videos are a godsend

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Philthy Phil Thank you :)

  • @nhlobane
    @nhlobane 9 ปีที่แล้ว +18

    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.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +10

      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 :)

    • @andreasn
      @andreasn 7 ปีที่แล้ว

      Norway checking in ! :)

    • @elvissibetyu7228
      @elvissibetyu7228 6 ปีที่แล้ว

      From Cape Town about to engage in the vid.

  • @billmoney1
    @billmoney1 9 ปีที่แล้ว +361

    o thank jesus i found a data structures channel on youtube that has an american speaking in the videos

    • @RaiZRiZ
      @RaiZRiZ 8 ปีที่แล้ว +26

      +Tim O Can't understand Indians :P

    • @user-mz1zs4pg5r
      @user-mz1zs4pg5r 8 ปีที่แล้ว +1

      Ikr!!

    • @benjaminhenry7497
      @benjaminhenry7497 7 ปีที่แล้ว +12

      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...:}

    • @edwardelrics2138
      @edwardelrics2138 7 ปีที่แล้ว +1

      indian drive me mad dude ==' data structures aint hard as the indian =='

    • @shripalshah100
      @shripalshah100 6 ปีที่แล้ว

      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?

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    You're very welcome :) Im very happy to be able to help

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    toString is used to control what is printed to the screen if print is used on an object

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    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

  • @RedQueenAvenged
    @RedQueenAvenged 9 ปีที่แล้ว +8

    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.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    I plan on covering it when I get back into data structures in the future

  • @MagiRaz
    @MagiRaz 9 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      hybredmoon I'm very happy that I could help :)

  • @herevancelightena9770
    @herevancelightena9770 3 ปีที่แล้ว +1

    Brilliant!!! It took 9 hours for my professor to explain the whole thing. Brilliant! Luckily they teach this one in math class

    • @derekbanas
      @derekbanas  3 ปีที่แล้ว

      Thank you very much :) I'm happy I could help

  • @khana.713
    @khana.713 6 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      Thank you for taking the time to tell me I've helped :) I greatly appreciate it!

  • @ganeshchandrasekaran5927
    @ganeshchandrasekaran5927 11 ปีที่แล้ว +1

    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.

  • @shubhamyeole8746
    @shubhamyeole8746 7 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the compliment :) I'm glad it helped

  • @user-mz1zs4pg5r
    @user-mz1zs4pg5r 8 ปีที่แล้ว

    You have no idea how this helped! You explained it better than my lecturer. Thank you.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Marie J Thank you :) I'm glad I could help

  • @jasonmattingly2620
    @jasonmattingly2620 8 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      Thank yu for taking the time to tell me they help :) I greatly appreciate it

  • @Chr0nalis
    @Chr0nalis 10 ปีที่แล้ว +2

    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

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +3

      I'm happy I could help :) Sorry about the speed.

  • @VenomEmperor
    @VenomEmperor 11 ปีที่แล้ว

    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.

  • @nicholaskong1673
    @nicholaskong1673 3 ปีที่แล้ว

    one of the best videos to learn how to code up the insert and traversal of a BST. Thanks, Derek.

    • @derekbanas
      @derekbanas  3 ปีที่แล้ว

      Thank you for the nice compliment :) I’m happy I could help

  • @PEPPERhijaker
    @PEPPERhijaker 7 ปีที่แล้ว

    You teach better than my professor, honestly thank you so much. Getting through this class wouldn't be the same

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the compliment :) I'm glad it helped

  • @michelleq943
    @michelleq943 11 ปีที่แล้ว

    I usually don't bother writing comments but I have to thank you for your awesome and helpful tutorials! Thank you!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    It is a label of sorts that is unique and is matched to a value

  • @chordolive
    @chordolive 11 ปีที่แล้ว +1

    You explained everything that my prof explained in 2 hours. Plus I actually understand you better than my prof. How?

  • @JohanSellus
    @JohanSellus 8 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Johan O Thank you :) I do my best to make original videos

  • @GarraOfTheFunk14
    @GarraOfTheFunk14 9 ปีที่แล้ว +1

    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!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +1

      +GarraOfTheFunk14 Thank you for the compliment :) I'm very happy that I could help.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you for the nice message :) i have many more tutorials and a new algorithm tutorial coming soon

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @dmacgTV
    @dmacgTV 8 ปีที่แล้ว +1

    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 :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +2

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    You're very welcome :) I should have made that part of the video more clear

  • @pawanshrivastava7405
    @pawanshrivastava7405 10 ปีที่แล้ว

    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!!

  • @VaderDpk
    @VaderDpk 7 ปีที่แล้ว

    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 :)

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you very much :) It is great to know the videos are helping

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) It is very nice of you to say that.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    Thank you very much :) I greatly appreciate that compliment!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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?

  • @Gelgo0g
    @Gelgo0g 9 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      Daniel Ball You're very welcome :)

  • @josephfernando4867
    @josephfernando4867 7 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the compliment :) I'm happy you like the videos

  • @Plaggard
    @Plaggard 10 ปีที่แล้ว

    I plan on acing my data structures exam later this morning thanks to your clear explanations. Thank you for making these awesome videos!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      I wish you the best on your exam. You're very welcome :)

    • @Plaggard
      @Plaggard 10 ปีที่แล้ว +3

      Got a 98 :)

  • @fremontleslie431
    @fremontleslie431 11 ปีที่แล้ว

    More than these BinaryTrees, I learnt something more important in life.

  • @samirdayalsingh0
    @samirdayalsingh0 9 ปีที่แล้ว +1

    helped in my exam at the last moment.
    i just saw the video, and went there and did the program.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      Samir dayal singh Great I'm glad I could help :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    Я сделаю все возможное, чтобы следующая часть понятна. Я надеюсь, что это поможет вам в будущем. Существует всегда что-то новое, чтобы узнать

  • @astroboomboy
    @astroboomboy 11 ปีที่แล้ว

    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!

  • @archiliusfowl3701
    @archiliusfowl3701 11 ปีที่แล้ว

    You are like the God of Data Structures!!! Hats off dude. And thanks a lot for putting this all together.

  • @dreqinwobz4855
    @dreqinwobz4855 11 ปีที่แล้ว +1

    I love how you are so multi-talented!

  • @grifsworld
    @grifsworld 10 ปีที่แล้ว

    Easily the most easy to follow and helpful tutorial I've seen on this topic, keep up the good work man!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you very much :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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?

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I'm going to revisit data structures and algorithms soon

  • @BriefBall
    @BriefBall 9 ปีที่แล้ว

    learning this in 'field' is much better than books or slides, Thank you

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +1

      elfassi mounir Thank you :) i'm glad I could help

  • @nerminsehic525
    @nerminsehic525 9 ปีที่แล้ว +1

    I have exam in like 10 hours, and dude you're saving my ass big time with these tutorials, awesome work.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      Nermin Sehic Thank you :) Best of luck on your exam.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Great I'm glad you found it. I do my best to comment the code.

  • @50rublej187
    @50rublej187 11 ปีที่แล้ว

    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

  • @rajlaxmikatkati7106
    @rajlaxmikatkati7106 10 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Rajlaxmi Katkati You're very welcome :) I'm planning another advanced algorithm tutorial. I hope to get it going soon.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +1

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Sometimes, but I don't normally use recursion because I try to make the tutorials as simple as possible

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Data Structures and Algorithms in Java by Lafore is pretty good

  • @ljka
    @ljka 6 ปีที่แล้ว

    We appreciate the good lecture, legibility of your codes, as well as Audio/Video quality. Thanks!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    It is a Binary Search tree. Yes you are correct. I'm glad you are enjoying the videos :)

  • @DeprecatedAPI
    @DeprecatedAPI 7 ปีที่แล้ว

    You are the best Derek Banas, thanks for making the lives of students like us much better. God bless you!!!

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      You're very kind :) May God bless you as well!

  • @MrMakemusicmike
    @MrMakemusicmike 5 ปีที่แล้ว

    wish I would have watched this before my Google Phone Interview.
    This video is simple and clear.

  • @sharathkoday3048
    @sharathkoday3048 10 ปีที่แล้ว +1

    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!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +1

      Thank you very much :) That's funny

  • @ahmaddaroon8965
    @ahmaddaroon8965 5 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  5 ปีที่แล้ว

      Thank you :) I'm very happy that I could help

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว +2

    I'm going to cover the other algorithms I missed asap

  • @korm0043
    @korm0043 8 ปีที่แล้ว +1

    Wow!! That was amazing! I wish my professor is just as great as you. That was very clear explanation. Thanks a lot!

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว +2

      Thank you :) I'm here for free when ever you need me

  • @msven
    @msven 10 ปีที่แล้ว

    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.

  • @jessebanana3492
    @jessebanana3492 6 ปีที่แล้ว

    For your description of binary trees I think you meant specifically binary search trees. Binary trees are simply trees in which each node has at most 2 children. There is no stipulation on ordering of the values of nodes relative to other nodes. That property applies to binary search trees, in which each parent node is greater than its left child and less than its right child. I just wanted to clarify that point. Otherwise great video, I liked the coding example.

  • @chAhAmA72
    @chAhAmA72 8 ปีที่แล้ว

    Thanks so much for this. I understood the algorithm, but the code walkthrough really helped me understand. Thank you so much!

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว +1

      I'm very happy I could help :)

  • @0xBK201
    @0xBK201 2 ปีที่แล้ว

    Uni student understanding trees in less than 15 minutes in 2022, rather than from a lecturer. Thank you.

    • @derekbanas
      @derekbanas  2 ปีที่แล้ว

      Thank you I'm happy I could help :)

  • @shatley123
    @shatley123 11 ปีที่แล้ว +1

    I'm glad your videos seem to be getting more views lately like they deserve :D

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) The world is a wonderful place.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Yes you are correct

  • @BOND-oc2vi
    @BOND-oc2vi 8 ปีที่แล้ว +8

    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!

    • @bipinpaudel5817
      @bipinpaudel5817 8 ปีที่แล้ว

      Desperately waiting for the same answer.

    • @ninjacell2999
      @ninjacell2999 8 ปีที่แล้ว +2

      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.

    • @statphantom
      @statphantom 8 ปีที่แล้ว +2

      +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

  • @kshannon6487
    @kshannon6487 10 ปีที่แล้ว

    This helped me massively on a project. You are the man!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Great I'm glad I could help :)