The Most Elegant Search Structure | (a,b)-trees

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • An introduction to (a,b)-trees - definition, operations, usage.
    ------------------
    Timetable:
    0:00 - Fever dream?
    0:28 - Introduction
    2:04 - Basics
    3:47 - Search
    4:33 - Insertion
    6:06 - Deletion
    8:51 - Selecting (a, b)
    10:36 - Usage
    11:22 - Outro
    ------------------
    Source code: github.com/xiaoxiae/videos/tr...
    Music (in the order it appears in the video):
    ► The Big Ten by Blue Dot Sessions: app.sessions.blue/browse/trac...
    ► Cases to Rest by Blue Dot Sessions: app.sessions.blue/browse/trac...
    ► Maisie Dreamer by Blue Dot Sessions: app.sessions.blue/browse/trac...
    ► Thannoid by Blue Dot Sessions: app.sessions.blue/browse/trac...
    Software used:
    ► Manim (animation software): github.com/ManimCommunity/manim/
    ► Kdenlive (video cutting): kdenlive.org/en/
    ► ffmpeg (audio/video processing): ffmpeg.org/
    ► OBS (audio/video recording): obsproject.com/download
    ► arecord (audio recording): linux.die.net/man/1/arecord
    ► sox (audio processing): sox.sourceforge.net/
    ► Inkscape (vector image editing): inkscape.org/
    ► Stable Diffusion (image generation): stablediffusionweb.com/
    Social media:
    ► Website (for other things I'm up to): slama.dev/
    ► Patreon (if you'd like to support me): / ytoms
    Thanks to Matěj Kripner, František Voldřich, Jakub Pelc, Hansen Pascal, Patrick Elsen and guys at @polylog7346 for valuable feedback.
    ------------------
    [CZ] Martin Mareš: Průvodce labyrintem algoritmů:
    pruvodce.ucw.cz/
    [EN] Effect of Node Size on the Performance of Cache-Conscious B+-trees:
    pages.cs.wisc.edu/~jignesh/pu...
    [EN] frozenca/BTree: open-source C++ B-tree implementation:
    github.com/frozenca/BTree
    [EN] Other (a,b)-tree-related resources:
    en.wikipedia.org/wiki/(a,b)-tree
    en.wikipedia.org/wiki/B%2B_tree
    en.wikipedia.org/wiki/B-tree

Комментарии • 42

  • @protiumdev
    @protiumdev Год назад +28

    Your videos are incredible! Loved the simplicity and the animations. Source code of the video is a big plus!

  • @theacorn7240
    @theacorn7240 Год назад +14

    i clicked on this curious if there was something nicer than a b+tree 😭. sticking around bc the quality is good

  • @cupatelj
    @cupatelj Год назад +17

    Very vell explained. Thank you for the video.

  • @khoda81
    @khoda81 8 месяцев назад +1

    OMG, This video is so good. So underrated. I am watching this after struggling to understand B-tree several times and oh god you're so good.

  • @antoine2571
    @antoine2571 Год назад +5

    Wow! The quality this video is incredible! And it remains true for every video on your channel. Thank you so much for it!

  • @nurosele3850
    @nurosele3850 Год назад +1

    I’m glad I found your channel.

  • @shahainmanujith2109
    @shahainmanujith2109 5 месяцев назад +1

    What a fantastic explainer! Quality is sublime! Well done!

  • @phobosmoon4643
    @phobosmoon4643 Год назад +2

    the amount of artifacting from youtube compression makes me feel like an ai watching a video. Ty for the nice video!

  • @ramit7
    @ramit7 Год назад +13

    thanks for this beautiful video ^_^

  • @reversev9778
    @reversev9778 Год назад

    This is really cool

  • @johanlarsson9805
    @johanlarsson9805 Год назад +1

    Thank you for your concern, yes I am indeed having a nice day :)

  • @mysyntax1311
    @mysyntax1311 Год назад

    new sub here . good work bro keep going !!

  • @_bustion_1928
    @_bustion_1928 Месяц назад

    We learnt in the university the AVL trees, and finding out there is a much better solution hurts a little bit : )

  • @kellymoses8566
    @kellymoses8566 11 месяцев назад +2

    B+ trees are used in nearly every database and filesystem.

  • @kxren.a7627
    @kxren.a7627 11 месяцев назад +1

    well animated videos are so helpful. Can you please keep making them until I graduate? Please.

  • @LunaSicilian
    @LunaSicilian Год назад +2

    hope you make video about Fenwick tree with this animation

  • @soikatabd4120
    @soikatabd4120 Год назад +1

    How do you edit these videos?Any tutorial?

    • @YTomS
      @YTomS  Год назад +3

      All of the software I use is free and linked in the description. I also wrote a series of tutorials on how to start animating with Manim (how most of the animations in the video are done): slama.dev/manim/introduction/

  • @hannahnelson4569
    @hannahnelson4569 9 месяцев назад

    Does anyone know what happens when you can't merge or steal? Stealing relies on an adjacent node having an extra and merging relies on the above node having an extra. What if neither of them have any extra to spare?

    • @YTomS
      @YTomS  9 месяцев назад +1

      The node above doesn't need to have an extra key. If it doesn't, we merge and have to fix the condition one layer above, that's why we prefer to steal (which doesn't propagate up).

    • @hannahnelson4569
      @hannahnelson4569 9 месяцев назад

      @@YTomS that makes sense! Thank you!

  • @rohmanatasi1771
    @rohmanatasi1771 Месяц назад

    whats the name of the music between 0:28 and 2:00, it doesnt seem to be one of the ones listed in the description

    • @YTomS
      @YTomS  Месяц назад

      It is - Cases to Rest. The UI on the website is, however, quite unintuitive and just pressing the play button plays a random track (you have to press on the name).

  • @linkernick5379
    @linkernick5379 11 месяцев назад

    Should I avoid the subscribing? Definitely, no! 😂
    Really well explained video 👍

  • @hannahnelson4569
    @hannahnelson4569 Год назад

    Very funny!

  • @waffle8364
    @waffle8364 Год назад +3

    you think rotations are more complicated than this?

    • @YTomS
      @YTomS  Год назад +4

      It's really a personal preference, but a-b trees feel cleaner to me because all I have to remember when adding is "if too many then split" and when removing is "if too little then steal / merge".

  • @caedenw
    @caedenw Год назад

    AA trees enter chat

  • @madhukiranattivilli2321
    @madhukiranattivilli2321 Год назад +11

    In "Usage" section u said c++ n java technically use Red-Black trees to implement maps and sets, but they are actually a-b trees
    How is a red-black tree same as a-b tree?

    • @YTomS
      @YTomS  Год назад +15

      There is a mapping between a 2-3 (or 2-4, based on definitions) tree and a R&B tree. I didn't want to mention it in the video since I'd have to define what an R&B tree is and it doesn't add too much to the video.

    • @hemerythrin
      @hemerythrin Год назад +4

      Imagine the red nodes / red-linked nodes as actually being part of their parent black node.
      If you're using red-black trees where black nodes can only have one red child, that gets you a 2,3 tree.
      If you're using red-black trees where black nodes can have up to two red children, that gets you a 2,4 tree.

    • @madhukiranattivilli2321
      @madhukiranattivilli2321 Год назад +1

      @@hemerythrin Thankyou!

  • @climbeverest
    @climbeverest Месяц назад

    Confusing as hell, what do the blank Squares mean? No nodes? Is this then a always 2 level tree?

  • @unLinuxeroMas
    @unLinuxeroMas 9 дней назад

    can you make a tutorial to make vidios in this style, is so sexy

  • @madhukiranattivilli2321
    @madhukiranattivilli2321 Год назад +7

    U speak too fast. Ok for a netflix movie or youtube entertainment video, but high speed talk in a technical video increases the # of rewinds to re-listen the sentences a few times. No?

    • @YTomS
      @YTomS  Год назад +7

      It's definitely better compared to my older videos, but I agree that it still isn't ideal. I'll try to slow the next one down :).

    • @blacklistnr1
      @blacklistnr1 Год назад +7

      ​@@YTomS If it helps, your speed is the one I target when I manually change it for other slower videos :))

    • @pratikkore7947
      @pratikkore7947 Год назад +3

      I don't think he spoke fast, just should've used more words to give us time to think and understand the operations

    • @madhukiranattivilli2321
      @madhukiranattivilli2321 Год назад

      @@pratikkore7947 Or my grasping power is weaker :)

    • @intermitttence2022
      @intermitttence2022 Год назад

      There are captions

  • @kahnfatman
    @kahnfatman Год назад +1

    Your videos are the next beautiful thing (I mean "wonderful") I have found beside Dr. Bartosz Milewski's series on Category Theory!
    How about webinars? I would definitely sign up for it.
    Keep up the great works and speak slower! 🫡