Coding Challenge #65.1: Binary Search Tree

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • This multi-part coding challenge is part of the first week of my course: "Intelligence and Learning." Here I attempt to implement a classic data structure: The Binary Search Tree. Code: thecodingtrain.com/challenges...
    p5.js Web Editor Sketches:
    🕹️ Binary Search Tree: editor.p5js.org/codingtrain/s...
    🕹️ Visualizing a Binary Tree: editor.p5js.org/codingtrain/s...
    Other Parts of this Challenge:
    📺 Visualizing a Binary Tree: • Coding Challenge #65.2...
    🎥 Previous video: • Coding Challenge #64.1...
    🎥 Next video: • Coding Challenge #66: ...
    🎥 All videos: • Coding Challenges
    References:
    📕 Intelligence and Learning (Spring 2017): github.com/shiffman/NOC-S17-2...
    📘 Grokking Algorithms book: amzn.to/2mMCK7Z
    🔴 Live Stream Archive #87.3: • Coding Train Live 87: ...
    Related Coding Challenges:
    🚂 #68 Breadth-First Search: • Coding Challenge #68: ...
    🚂 #98 Quadtree: • Coding Challenge #98.1...
    Timestamps:
    0:00 Introducing today's topic: Binary Trees
    1:18 Why would you use a binary tree?
    3:36 What is a data structure?
    4:47 Nodes with children
    8:27 Algorithm for how the tree is sorted
    11:36 Node object
    12:17 Tree object
    12:39 Use prototype to add an addNode function
    18:58 Use recursion to add nodes
    20:42 Deal with the case when two values are equal
    22:50 How do you traverse the tree?
    25:00 What does it mean to visit a node?
    27:39 Add random values
    28:58 Add a function to search the tree
    37:57 Conclusion and suggested variations
    Editing by Mathieu Blanchette
    Animations by Jason Heglund
    Music from Epidemic Sound
    🚂 Website: thecodingtrain.com/
    👾 Share Your Creation! thecodingtrain.com/guides/pas...
    🚩 Suggest Topics: github.com/CodingTrain/Sugges...
    💡 GitHub: github.com/CodingTrain
    💬 Discord: thecodingtrain.com/discord
    💖 Membership: th-cam.com/users/thecodingtrainjoin
    🛒 Store: standard.tv/codingtrain
    🖋️ Twitter: / thecodingtrain
    📸 Instagram: / the.coding.train
    🎥 Coding Challenges: • Coding Challenges
    🎥 Intro to Programming: • Start learning here!
    🔗 p5.js: p5js.org
    🔗 p5.js Web Editor: editor.p5js.org/
    🔗 Processing: processing.org
    📄 Code of Conduct: github.com/CodingTrain/Code-o...
    This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
    #binarysearchtree #datastructure #intelligenceandlearning #javascript #p5js

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

  • @adamoja4295
    @adamoja4295 2 ปีที่แล้ว +23

    Your not editing out the parts where you get confused (like with the returns in the recursive methods ) is wholesome . It’s what others don’t do . And this is a priceless lesson for everyone who has not been confronted with those kinds of problems before .
    Fan since started to code.

  • @kenhaley4
    @kenhaley4 7 ปีที่แล้ว +133

    Dan, I think you left out the most important (and hardest) part of binary trees; namely, keeping the tree balanced. Consider, for example building a tree using the numbers from 1 to 100 in ascending order. The root node would be 1, and there would be 100 nodes none of which would have a left node. Nothing but a linked list. Balancing the tree after each insert avoids this.
    I wouldn't expect you to actually do tree balancing in a quick coding challenge, but I think the task should be mentioned, and should perhaps challenge us, the viewers, to work out how to do it. Or.. make it a coding challenge by itself (?)

    • @_javlm_
      @_javlm_ 5 ปีที่แล้ว +15

      AVL Tree

    • @asubaba123
      @asubaba123 5 ปีที่แล้ว +14

      BST isn't balanced, AVL is

    • @JackFlashTech
      @JackFlashTech 4 ปีที่แล้ว +3

      Upvote because I agree, but this is the first I’d learned that a BST can be unbalanced (according to Wikipedia). Not nearly as useful without it.

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

      It's not a AVL tree! Just a binary tree!

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

      Code for balace is ez (8 Lines), problem is run time

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

    I love the reasoning and unedited display of bloopers. This gives it a human touch and is way more realistic, than pretending to get everything correct the first time. Thanks! 🙏🏻 😊

  • @Tordek
    @Tordek 7 ปีที่แล้ว +26

    The pictures you saw in the image search are perfectly fine: they're pictures of binary trees; that is, trees where each node has up to two children. However, not all binary trees are binary SEARCH trees, which are ordered the way you expect. Had you searched for that instead you'd have gotten the expected results :)

  • @yungrolex1992
    @yungrolex1992 7 ปีที่แล้ว +2

    I hopped on the coding train about two weeks ago and I have been binge watching all of your videos man. You are a great, enthusiastic teacher. I looked you up and saw the Swarm project and was amazed. Thanks for teaching all of us!

  • @kosmic000
    @kosmic000 7 ปีที่แล้ว +54

    ur just amazing dan,,not just a perfect instructor but also a cheerful , kind human being

  • @ali_gaming3190
    @ali_gaming3190 7 ปีที่แล้ว +542

    Do a series on data strucrures and algorithms

    • @Xeronimo74
      @Xeronimo74 7 ปีที่แล้ว +65

      please?

    • @akashakya
      @akashakya 6 ปีที่แล้ว +11

      please i beg you shiffman

    • @ritikkhatri
      @ritikkhatri 6 ปีที่แล้ว +5

      PLease!

    • @MrBuckethead911
      @MrBuckethead911 6 ปีที่แล้ว +5

      AMEN TO THAT

    • @alexi1182
      @alexi1182 6 ปีที่แล้ว +1

      It'd be too late, but hell I'd get use of next semester

  • @top1percent424
    @top1percent424 7 ปีที่แล้ว +10

    I love data structures and algorithms; they are so clever ideas and concepts. Love it!

  • @kolozubix99
    @kolozubix99 7 ปีที่แล้ว +23

    that look of enthusiasm in your eyes at 0:07 is absolutely amazing :D

  • @wyattelliott5200
    @wyattelliott5200 6 ปีที่แล้ว +4

    the recursion in visit() is dope. Only presentation on binary tree search that I've been able to listen to so far. Keep it up man

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

    Finally, I properly understand the concept of Tree from this video. I always appreciate your teaching and your attitude. You're so much helpful. Thanks for you from my heart!

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

    Thanks for the series on binary trees. We used them to sort images according to similarity. Thanks also for opening object oriented programming for me. 20 years of people telling me it was like dogs and cars didn't do the job. Seeing someone do practical examples made it so clear!

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

    I just love your enthusiasm and happiness. You are one of a few TH-camrs that actually make me giggle, even though you're not trying to be hilarious. Keep being awesome! Oh and you kind of made me come back to programming. I'm an electrical engineering student myself, but I used to code a lot when I was a kid and all the way through high school, but got burned out. So thanks for making a difference in my life! (:

  • @RM-lw2qi
    @RM-lw2qi 7 ปีที่แล้ว +1

    THANK YOU! You would be the perfect teacher for data structures and algorithms, please do more

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

    Congratulation Mr. Shifman: you've made it! I finally get it about binary trees logic and why it's so useful in sorted algorythm...

  • @steevenpetit-homme5267
    @steevenpetit-homme5267 6 ปีที่แล้ว +1

    I like the fact that I have tried to look for the bug with you,
    but I could not see what's wrong.
    I love this man .
    Thks!

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

    Thank you! Excellent! Looking forward to part 2. Thanks again. You teach/explain really well. Can you please do a complete series on data structures and algorithms?

  • @avatar098
    @avatar098 7 ปีที่แล้ว +74

    To clarify, a Binary SEARCH Tree is what he is implementing.
    A Binary Tree in general is just a tree in which all parents have (at most) two children.
    The difference is that a Binary Search Tree is a special kind of Binary Tree in which the the children will either be to the left of the parent or the right depending on if the child is less than or greater than it's parent. :)

    • @robtvogel
      @robtvogel 7 ปีที่แล้ว +5

      I came to the comments for this. I also believe a binary tree is usually built to remain as closely to balanced as possible.

    • @-._.-KRiS-._.-
      @-._.-KRiS-._.- 2 ปีที่แล้ว +1

      All children should be greater than their parents.

    • @EduAnmoldeep
      @EduAnmoldeep 2 ปีที่แล้ว +1

      @@robtvogel Same in my case, I was also expecting someone should have pointed this out :D

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

    This really helps with understanding recurssion more indepth, atleast for me xD. This is awesome. Thank you Mr. Shiffman for this video.

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

    Hey Dan, I love your coding tutorials and coding challenges they actually teach a lot. But I believe you left a really important thing outside this binary trees and thats Balancing the trees.

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

    It's important when implementing pathfinding for games. Find the shortest path to a certain point, for example. great explanation! thanks!

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

    Never understood binary trees until now! This was great!!! Thank you!

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

    Your videos are educational and joyful. Thank you for the lectures.

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

    This what I need!
    I have code that uses A* to solve 8-puzzle. It uses java's built in priority queue to hold node successors and a comparator to keep them sorted. I want to try and write something like that on my own and this seems like a great way to do it!

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

    Duuuuuuuuude u are amazing!!!! Love your work first time ive seeen any of your videos and incan already tell ur an amazing teacher!!

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

    Inspired by the phone book example.
    In psychiatric hospital a doctor gave a phone book to a patient. After a week the doctor meets the patient again and asks him about the book.
    The patient answered, the story is not really interesting, but the number of characters is really impressive.
    Great job Dan love your work. Greetings from Geneva Switzerland.

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

    @The Coding Tree
    Referencing 21:26, the console.log shows the state of the object when the object is expanded in the console, not the state of the object when it is logged to the console. You need to do something like serialize the object to a string and console.log() the string to get the state of the object at the time the object is logged. I usually use JSON.stringify().

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

    Always cool to learn from a good teacher AND from his mistakes^^

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

    I like how the BST you randomly made just happened to be balanced. That is, there is no node such that |depth right - depth left| > 1

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

    You're like the Bob Villa of programming and I love it

  • @Holobrine
    @Holobrine 5 ปีที่แล้ว +1

    I had to a CS assignment that does math with a binary tree, with number leaves and operator inner nodes. By the way, you don’t need a tree type. When you add a node, if the root is null, you set it to the node, otherwise you recurse to the left or to the right.

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

    I'm learning C, and this is in JS which I don't know at all. But I understand clearly what he is doing. Also from his videos I started to understand what is OOP!

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

    Aliens from the future tell you ES2015 introduced classes in JS.
    I really like the fact that you delegated the Node class to visit() and search() as this seems way more reasonable than putting a bunch of code within Tree class, because in the end Tree is just a wrapper while Node is a meaningful representation of a tree. As weird as it may sound.

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

    A little late to the party but thank you for making this video, it helped a lot more than these academic books hah. Into my second year and just started algorithms and data structures, very interesting but mind numbing at times 😊. This video was fun to watch and helped me understand binary search trees. Thank you!

  • @jorgegranada4964
    @jorgegranada4964 5 ปีที่แล้ว +1

    Decissions are binary. You can allways resume them as "should i do this or not". Both have consecuencies AND lead to More binary decissiones.

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

    I've used a variation on binary trees for collision handling. They have their uses :).
    In early August I finished an ~1.5yr long project for a rough visualization of several thousand particles colliding in real time. It used compute shaders on my graphics card and handled large-scale collisions in O(log(n)) time through a variation of a binary tree called a "bounding volume hierarchy". It was rather cool (after I managed to dig through the academic papers with the algorithms).

  • @paclion9345
    @paclion9345 7 ปีที่แล้ว +6

    Wow this channel is amazing, just discovered it

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

    A series or a video on coding a simple Gerrymandering Algorithm would be amazing!

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

    The traversal method he is using is the "In order" transversal, which will return the numbers sorted. You can also do a "pre order", "post order", and level order. :)

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

    The images you were looking at are " binary tree " which represents data structure tree with max 2 degree of nodes... the structure yoy wanna look for is " binary search tree "

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

    Let's go over to the whiteboard.
    Immediately leaves the shot of the white board. I can't wait to learn from this man.

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

    Great vid as always Dan !

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

    I love his enthusiasm

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

    When I was watching one of your videos for the first time I thought: "Who is this crazy guy and why is he so happy all the time?" In all honesty I didn't really like you but then I watched some more of your videos and now I'm subscribed. I like to watch your videos when I'm programming because its really relaxing. Keep up the good work! Really looking forward for more videos. :)

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +3

      Hah, thanks for the feedback!

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

      @@TheCodingTrain always happy guy😅

  • @euklidian-space
    @euklidian-space 6 ปีที่แล้ว +2

    Watching you struggle through tree algorithms is endless entertainment

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

    you can pass as many arguments to console log as you want, it'll even put spaces between strings for you and print objects nicely

  • @adomasz.3958
    @adomasz.3958 7 ปีที่แล้ว

    I don't know why I love this video so much :D

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

    Really like the way you talk about programming : )

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

    Anyone interested in a Python implementation, feel free to check out my recent lesson: th-cam.com/video/f5dU3xoE6ms/w-d-xo.html

  • @foolishsamurai
    @foolishsamurai 7 ปีที่แล้ว +237

    I want to know where u buy ur adrenaline from :)))))

    • @phuong7357
      @phuong7357 5 ปีที่แล้ว +31

      @@thcoura You must have a really sad life then.

    • @cxT9344
      @cxT9344 5 ปีที่แล้ว +14

      It is called passion

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

      from Alien in the future

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

      Local crack dealer

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

      Yeah this video really needs some editing because it seems he doesn't know what he's talking about (but he does). Overall a good explaination though.

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

    I love this guy! Better to be entertaining and unpolished

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

    Really awesome video. I like how you explain all these stuff

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

    An excellent mistake at the end that brings up a very good practice: maintain reliable returns for recursive function calls. Thank you for the lesson!

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

    This can be used for datapacking if instead of smaller or larger numbers use the commodity of the item and the more common it is the higher it is now 1 or 0 will be left or right and boom most efficient datapacking without a separate library

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

    Great video! But Can I ask you something? In the next video, are going to only show how it works or you also explain where it used, advantages and disadvantages (like tree degradation if you add sorted sequence)?

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

    I love learning new algorithms.

  • @NinjaKyou
    @NinjaKyou 7 ปีที่แล้ว +181

    Can you do a series on data structures an algorithms?

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

      sorry, What?!!

    • @user-vx1wt4hb5l
      @user-vx1wt4hb5l 4 ปีที่แล้ว

      @@andachain Lol idk either

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

      your name

    • @user-vx1wt4hb5l
      @user-vx1wt4hb5l 4 ปีที่แล้ว

      @@Tuberex What's wrong with my name?

    • @user-vx1wt4hb5l
      @user-vx1wt4hb5l 4 ปีที่แล้ว

      jk im not whoosh bait

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

    "Insert one direction music" - i know i have the right idol. More power to you, Dan!

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

    I love all your videos please continue

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

    In the next video you should also add a function to remove a node! I recently had to implement my own binary search tree for a class and removing can be quite difficult in java, I would like to see if it is just as hard in JavaScript.

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

    you make binary search looks easy thankyou so much sir!!!

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

    Very good job dude!! I just bought that book to

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

    Dude, I really like your bow tie!

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

    very interesting video, love how good you explained it

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

    Amazing! You make me wanna learn js

  • @nightcoder5k
    @nightcoder5k ปีที่แล้ว

    I had a lot of fun doing this in college using Pascal on SunOS 3.x.

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

    you have no idea how much you help me :)

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

    i love this man so much

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

    omg.....some actual computer science 101 / software engineering topics ......how exciting !

  • @sinyolinuxozy
    @sinyolinuxozy 7 ปีที่แล้ว +2

    Nice explanation sir, do a data structures and algorithms series, please :)

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

    Thanks a lot brother!

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

    you are a life saver Sir

  • @paulfarcas4522
    @paulfarcas4522 7 ปีที่แล้ว +3

    how did you get that select bar in the google search with different programming languages?

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

    Love you Daniel ❤️

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

    you are AWESOME ! thank youuuuuuu!!!! :)

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

    First of all, great video, absolutely love your enthusiam!!
    I'm having issues understanding the visit()-function though, to a point where
    it is driving me crazy, maybe someone can enlighten me. Here's how i
    understood the code:
    Taking Dans first tree with the numbers 3,5,6,7, 5 would be the root, 3 & 7 to the left
    and right of 5 and 6 to the left of 7.
    Now tree.traverse() is called, which itself calles the visit()-function on the root-node
    with the value of 5.
    visit() then checks, if a left node is present (which it is, with value 3), calls itself
    again on the node with value 3 (executing this.left.visit()) and checks, whether THIS node
    has another node present to the left, which is NOT the case, so it skips the first if-statement
    and prints the value 3.
    Following the code, the second if-statement is skipped, because there is also no right node
    (this.right != null is false).
    At this point, i would assume, the visit()-function is at its end, how are the
    following nodes visited? Somehow the code must jump to the node containing the value 5
    and then to the ones with 6 and 7, to print them all in order, but i just don't get how.
    Somewhere, my explanation must be horribly wrong.. Any explanation is highly appreciated.

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

      It's a recursive call dude. it uses stack. So, when it doesn't meet any relevant condition, then it goes back to the previous node.

  • @pucbg2902
    @pucbg2902 5 ปีที่แล้ว +1

    Sir Will you please START JS WITH UNITY because I love your teaching skill and programming skill. When Sir you will start unity there will new world appearing

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

    Please Coding challenge: how to draw binary tree (or ternary or other subtypes), and how to draw graph! It would be amazing learn how it visually looks like graphs and trees. I love your videos (: A viewer from Cancun, Mexico.

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

    The first time some ancient video mentions a proper explanation of phone book and phone number!

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

    Sir,please do a series on graph problems and approach for competitive programming

  • @benjaminphilippe2810
    @benjaminphilippe2810 7 ปีที่แล้ว +19

    I know what a phone book is! It's a book full of phones (DUH!). So when you need a new phone, just find in in the phone book! (right?)

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

      😅

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

      your stupid phone book is a book that contains photos of every phones you cant just pull them out!

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

      @@Tuberex r/woooosh

  • @MikeMcRoberts
    @MikeMcRoberts 7 ปีที่แล้ว +3

    I challenge you to create a star map based on real star coordinates, converting RA & DEC coordinates to screen coordinates.

  • @PedroPauloAlmeida0
    @PedroPauloAlmeida0 4 ปีที่แล้ว +3

    Why not use a Linter to avoid all those small bugs? Anyway, thank you for your effort.
    PS: you can use "comma" in console log: `console.log('Found', someObject);`

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

    Well, as of writing this I am one day in the future. So I am well versed in the technologies that you are describing. ^.^

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

    Can this be used with an Expert System and Rules Structure to teach the computer by giving more and more detail but instead of a Node concept it would be frames Following Marvin Minsky's Idea of Frames and Agents?

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

    Yo Daniel try only using one return statement and just assign a variable to what you want to return and return the variable it will make your code simpler and easier to debug and update.

  • @alekmoth
    @alekmoth 7 ปีที่แล้ว +14

    UP ARROW to repeat commands in the console!!

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

      alekmoth 36:51 he knows, right? He didn't use that because the numbers are different each time.

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

      omg I didn't even know I watched that video 11 months ago!

  • @edvaned8207
    @edvaned8207 ปีที่แล้ว

    great class! 😎😎😍😍😍😍

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

    you are a good man!

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

    I keep switching back and forth between brackets, index.html, and this video. For like the third time i have hit f5 on this video to try to make it play or refresh my web page.

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

    Bill Nye of CS vibe , I dig it

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

    thank you so much

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

    Please, we really need a series on Data structures and Algorithms by Shiffman

  • @charbelsarkis3567
    @charbelsarkis3567 6 ปีที่แล้ว +3

    it's hilarious how he speaks to us like we're waaaay in the future

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

    that's so easy and common that I'm 16 and I've already seen that about 5 times and I'm not even doing anything related to it..,not doing anything at all, actually, but kinda learning programming...
    I love phone books and Compact Disks

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

    I was confused about prototype, but now I have translated the binary tree search from your code to python I see it is basically a function inside a class (in python terms anyway).
    I'm still new to coding in general so hopefully someone will correct me if I'm wrong.

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

    This was a funny parody of a newbie programmer implementing their first BST. I'm surprised you didn't put it out on April 1st of that year.

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

    Hey Daniel,
    i just started programming a couple of days ago and now I'm wondering which programming language/ environment to learn first. I absolutely love the coding challenges which are mostly done in p5js which I'm feeling more comfortable with atm but I'm planning to read your book and it is all about processing. I'd like to get good with one of the languages and transitioning between them shouldn't be too hard then but which one do you recommend for starting off?
    Please keep on doing what you are doing, mfg.

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

      Oh, this is such a hard question! It really doesn't have an answer. Does one appeal to you more for one reason or another? If you care about having your stuff on the web then I would say JS, if not then maybe try Processing? I don't know!

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

      Yes it is such a hard question, I think I may just try to learn them both at once because I can't decide :D

  • @Eresea
    @Eresea 6 ปีที่แล้ว +1

    Hi, very cool videos it's an awesome way to learn interesting programming concepts.
    On the topic of tree structures I was wondering if you could do a video on a QuadTree implementation to show spacial distribution.
    I'm using QuadTrees on procedural planet generations in games and found it very challenging but interesting.
    Thanks !

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว +2

      Please suggest or upvote here! github.com/CodingTrain/Rainbow-Topics/issues I definitely want to tackle this.

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

    Dan, I'm curious how we can add a value that's equal to the node to the tree