Binary Search Animated

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ •

  • @ginger-viking
    @ginger-viking 2 місяці тому

    Amazing video

  • @JuicyJW
    @JuicyJW 2 місяці тому

    BLESS YOU

  • @Amgk69
    @Amgk69 6 місяців тому

    I subscribed cause i loveeed ur video :)

  • @phoumint
    @phoumint 5 місяців тому

    What a great video! Thank you so much.

  • @frd85
    @frd85 7 місяців тому

    awesome video

  • @__________________________6910
    @__________________________6910 7 місяців тому

    Thanks 🙏

  • @gorkemgenc344
    @gorkemgenc344 3 місяці тому

    amazing video and visualisation, also happy to see the Lost reference :)

  • @bagfleet
    @bagfleet 7 місяців тому

    Great vid!

  • @fateriddle14
    @fateriddle14 7 місяців тому +137

    I hope people support these type of videos, instead of those IT drama shows.

    • @Eckster
      @Eckster 7 місяців тому

      Agreed, good content right here

    • @dboydomr
      @dboydomr 7 місяців тому +11

      What is an It drama show?

    • @XDarkGreyX
      @XDarkGreyX 7 місяців тому +1

      Uhm... and if people enjoy those? Also, they can enjoy both types....

    • @omaryousifkamal4290
      @omaryousifkamal4290 3 місяці тому

      agree

  • @oguzsahin5242
    @oguzsahin5242 3 місяці тому

    Animations make it crystial clear for the understanding, thank you!

  • @karthikgururajan1131
    @karthikgururajan1131 3 місяці тому

    Production level of the video is just amazing

  • @phpsoftwareengineering
    @phpsoftwareengineering 7 місяців тому +1

    Such a great video! Thanks!

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +1

      Thank you! I'm glad you enjoyed it

  • @JimRohn-u8c
    @JimRohn-u8c 7 місяців тому +2

    Please make more of these! This was amazing!

  • @momensy2136
    @momensy2136 7 місяців тому

    I really feel so lucky that i found your channels
    Please keep up on the content, can't wait to see your channel grows well and get what it deserves ❤🔥.

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +1

      Thank you! I appreciate that a lot!

  • @gutohertzog
    @gutohertzog 6 місяців тому +9

    I am a Python teacher at night as my second work and passion.
    I will show your video to my class and implement with them the Binary Search.
    Awesome video.

  • @privatename1250
    @privatename1250 7 місяців тому

    Absolutely fantastic explanation

  • @muhammadnaqi4242
    @muhammadnaqi4242 7 місяців тому +65

    The quality of the animation of this video is really really impressing.

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +5

      Thank you!

    • @paddingbox9845
      @paddingbox9845 7 місяців тому

      @@dreamsofcode nice work

    • @SecretX1
      @SecretX1 7 місяців тому

      @@dreamsofcode How do you create these animations? That could be the topic of a future video. Keep the good work!

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +3

      ​@@SecretX1 Pretty much all of this was done using Adobe Illustrator and After Effects! I def had to learn a lot.
      Absolutely would love to do a video on it! There's also some code with after effects expressions.

    • @riteshharjani
      @riteshharjani 4 місяці тому

      Given you have been making such videos for sometime. I would love to know how have you perfected the art of this? Meaning you might have created a process for this which makes your creation of such videos fast.
      Would you share your recipes with us?

  • @dr_regularlove
    @dr_regularlove 7 місяців тому

    Would love a video going into the differences between binary trees and B-trees.

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +3

      Absolutely! I'll add that to my backlog 😁

    • @angeldude101
      @angeldude101 7 місяців тому +1

      A binary search splits the remaining nodes into two at each node. Similarly, you can make a "ternary search", where you check 2 roughly evenly spaced nodes to determine which of 3 sectioning the desired node is in. A B-tree is ultimately a "variable-ary search tree", where the number of immediate children of a given node isn't a fixed 2 or 3, but can vary depending on the situation, such as based on how many nodes will fit within a pre-decided maximum size when the nodes themselves might not necessarily have a constant size (though they should be the same within a given node to enable random access).
      Often, finding which child node has a desired value is done with a linear search of the values in the current node.

    • @dr_regularlove
      @dr_regularlove 7 місяців тому

      @@angeldude101 Thanks for that, yeah I can see how this would lend itself well to use cases such as DB indexing, especially with tunable parameters like that pre-decided maximum size with variably sized nodes like you mentioned. Still would love to see a Dreams of Code style video going into it with the minimalist visual aids that imo can go a long way in terms of really impressing a concept into the brain.

  • @kellyredds7292
    @kellyredds7292 3 місяці тому

    Am so glad i run into this today. Its like dude removed and demystified every misconception and road block i had concerning search and sorting algorithms. I literally had an epiphany. This video made me a master over binary search and its time complexities.😅😅😅

  • @kurshadqaya1684
    @kurshadqaya1684 7 місяців тому

    Awesom!

  • @RelaxingNature4kUltra
    @RelaxingNature4kUltra 5 місяців тому

    this video was perfect to understand DSA in one short.

  • @Aveniix.
    @Aveniix. 7 місяців тому

    Can you do a neovim setup for c#? Thanks

  • @greasedweasel8087
    @greasedweasel8087 7 місяців тому

    5:54 the only thing better than the Lost reference is the rest of the video

  • @lemonadeforlife
    @lemonadeforlife 7 місяців тому

    Nice Animation but as a Linux User. I have one question, in fact it's just a simple question.
    Did you resort to windows for producing this animation?(y/n)

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +1

      I did not! I resorted to macOS 😭
      My next plan is to use windows in a VM with pcie passthrough

    • @lemonadeforlife
      @lemonadeforlife 7 місяців тому

      @@dreamsofcode After careful consideration and many decisions later, we came to the conclusion that since it's not a Window. And macOS is UNIX based.
      Congratulations🎉!
      Your "I use arch btw" license is not going to terminate.
      Have a good day🐧

    • @dreamsofcode
      @dreamsofcode  7 місяців тому

      @@lemonadeforlife I'm on a provisional probation with it!

  • @berndeckenfels
    @berndeckenfels 7 місяців тому +1

    Unlike b- or binary trees a sorted array has zero (pointer) overhead, so it’s great when it can be pre-calculated and is static.

  • @GabrielFury-mg8du
    @GabrielFury-mg8du 7 місяців тому +3

    I love your appreciation of Lost

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +4

      My go to set of numbers! I'm glad you noticed haha

  • @Iuigi_t
    @Iuigi_t 7 місяців тому +2

    This video is the greatest example of explanation. You even care for edge cases of the algorithm. I love that detail at 2:01. The animations are great, too! This video is truly a masterpiece.

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +2

      Thank you so much! I'm really glad people enjoy it! Was a complete labor of love :)

  • @paddingbox9845
    @paddingbox9845 7 місяців тому

    I really enjoyed it, especially the awesome animations. question: If I want to learn data structures and algorithms, where should I begin? Can you recommend a UA-cam channel?

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +1

      I haven't found many channels with DSA content personally but I'm sure there are some out there! It'll take me a while to build out my DSA collection.
      I personally learnt from some great books! I heard that Grokking algorithms is a good one as well which I plan on reading soon

    • @paddingbox9845
      @paddingbox9845 7 місяців тому

      @@dreamsofcode yes! there are plenty out there. I found Neso Academy interesting. I also checked out the book you suggested. btw I love your content and nvim setup. I look forward to more!!

  • @uomolercio
    @uomolercio 7 місяців тому +2

    Can you do quicksort and mergesort?

  • @shuaibkhan7775
    @shuaibkhan7775 7 місяців тому +1

    Hoping for B-tree ds in the next video

  • @conaticus
    @conaticus 7 місяців тому

    Amazing video as always! If only everybody taught this efficiently on UA-cam 😄

  • @robertwhite3503
    @robertwhite3503 7 місяців тому +18

    Most arrays are small. A linear scan is fine for small arrays. Larger amounts of data are typically stored in databases which do not used arrays (generally) and are generally based on B-tree as mentioned in the video. B-tree is quite different from binary trees in concept.

    • @no-tomorrow7425
      @no-tomorrow7425 7 місяців тому +4

      Yeah, I agree with this point. For large amounts of data one usually just uses the search functionality offered by databases... no need to implement search from scratch (unless one works for a database company :) )

    • @angeldude101
      @angeldude101 7 місяців тому +1

      "B-tree is quite different from binary trees in concept." What do you mean? Is a binary tree not simply a B-tree where the minimum and maximum number of child nodes are 0 and 2 respectively? Yes, binary trees are often balanced, but they don't strictly have to be, and B-trees are usually balanced too, though in a slightly different manner.

  • @jaddadzakaria
    @jaddadzakaria 7 місяців тому

    Hey, i just want to know with what tool do you make this smooth and beautiful presentations and thanks guys

    • @dreamsofcode
      @dreamsofcode  7 місяців тому +1

      This was done pretty much exclusively with Adobe After Effects for the animations, and Davinci Resolve for the final editing!

  • @anthonyraf
    @anthonyraf 7 місяців тому

    In french we call it "recherche dichotomique". But the array needs to be sorted first.

  • @nessitro
    @nessitro 7 місяців тому

    I'll share this one with my friends, very informative!

  • @fahimferdous1641
    @fahimferdous1641 7 місяців тому

    new CS playlist loading?

  • @bastiana3611
    @bastiana3611 7 місяців тому

    I really enjoy it when you give examples of when stuff is used like how you compared when to use linear search vs binary search here. I'd love to see more of that! :)

  • @doryan08
    @doryan08 7 місяців тому

    Please do more videos about other algorithms and their application on real life like Dijkstra or A*. The animation that you use is very useful to understand those.

  • @a1mer06
    @a1mer06 7 місяців тому

    I wish I had this video back in my first Uni semester 😭

  • @avishjha4030
    @avishjha4030 7 місяців тому

    Elegant as always! Also, nice play there with the git dates and commit messages!

  • @obiwanjacobi
    @obiwanjacobi 7 місяців тому +1

    Note that CPUs with cache lines and prefetching (like x86), linear search until a couple of MB is the fastest you can get.
    It is easy to do the benchmarks yourself.

  • @angeldude101
    @angeldude101 7 місяців тому

    One of the reasons to prefer linear search over binary search is the cache, since reading one value will make the CPU implicitly fetch the values around it, and if you can use those rather than discarding all of them and jumping away, then the fewer data transfers can actually trump the fewer operations of the binary search.
    However it is actually possible to get the best of both worlds, with fewer comparisons while still respecting the cache. It just requires an unusual form of sorting. The structure is similar to an array-backed heap, but the order of the nodes is that of a traditional binary search tree. This type of structure was first described by Michaël Eytzinger in 1590 for efficiently searching through genealogical data and a person's ancestry... on paper.

  • @bibekjha5628
    @bibekjha5628 7 місяців тому

    Loved the video and the animation just great hope to see more of this kind of video may be one on breadth first search. ❤️

  • @robin-lol
    @robin-lol 7 місяців тому +4

    Nice little XZ reference you snuck in 🤭

  • @Redyf
    @Redyf 7 місяців тому

    hello everynyan

  • @Simple_OG
    @Simple_OG 7 місяців тому +1

    code aesthetic, dreams of code similar logo similar video style so much confusion

  • @yugalkhanal6967
    @yugalkhanal6967 7 місяців тому

    first

  • @goporororo7404
    @goporororo7404 7 місяців тому

    1 min no views

  • @shogun8-9
    @shogun8-9 7 місяців тому +1

    4 8 15 16 23 42

  • @dnyaneshmutthe5433
    @dnyaneshmutthe5433 2 місяці тому

    Nil bkc