Recitation 5: Recursion Trees, Binary Search Trees

Поділитися
Вставка
  • Опубліковано 5 чер 2024
  • MIT 6.006 Introduction to Algorithms, Fall 2011
    View the complete course: ocw.mit.edu/6-006F11
    Instructor: Victor Costan
    License: Creative Commons BY-NC-SA
    More information at ocw.mit.edu/terms
    More courses at ocw.mit.edu

КОМЕНТАРІ • 64

  • @lahaale5840
    @lahaale5840 6 років тому +20

    Victor is a genius, he make everything so clear and simple

  • @cuebal
    @cuebal 10 років тому +7

    Man , you save me again and again. Thanks MIT

  • @ganstabreakincity
    @ganstabreakincity 6 років тому +1

    This class was just so good, well explained and I was able to understand most of it from begining to end, now it is time for the longest part, take a book and implement it!!

  • @edmunds4635
    @edmunds4635 3 роки тому +1

    most valuable 360p youtube video. danke mit!

  • @thipher
    @thipher 6 років тому +20

    14:10 Binary Search Trees discussion starts

  • @thomasjefferson6225
    @thomasjefferson6225 2 роки тому +1

    man far better than the lecture i got today.

  • @chenggu8600
    @chenggu8600 8 років тому +3

    inorder successor begins at 35:40

  • @keertisekharsahoo
    @keertisekharsahoo 9 років тому +2

    Lucid explanation :)

  • @stevenjchang
    @stevenjchang 5 років тому +16

    Hold up, the O in Big O notation stands for order of?
    as a self-taught developer, I feel dumb

    • @blasttrash
      @blasttrash 4 роки тому +2

      duh? what did you think it stood for? just curious

    • @anonimous4798
      @anonimous4798 4 роки тому +25

      @@blasttrash I thought it stood for Ogre, honoring your mom...

    • @dragon_warrior_
      @dragon_warrior_ 4 роки тому +1

      @@blasttrash I would like to know tooo xd

    • @blasttrash
      @blasttrash 4 роки тому

      @@anonimous4798 nah dude, he was honoring your mom.

    • @anonimous4798
      @anonimous4798 4 роки тому +5

      blasttrash Good one

  • @AlexandriaRohn
    @AlexandriaRohn 8 років тому +6

    42:17 Binary Tree Deletions

  • @suzukikenta1079
    @suzukikenta1079 7 років тому +2

    Why is necessary to change n to cn? Why recursion is infinite? It seems to me that there are finite recursions or nodes until it contains only one element.

  • @supremepancakes4388
    @supremepancakes4388 5 років тому +1

    This instructor has such illegible handwriting (not bad but how to differentiate the letters) yet his accent is weirdly comforting...I came here to freshen up my recursion stuff and can't believe i am actually getting through them

  • @luizfelipels7
    @luizfelipels7 3 роки тому +2

    27:15 Who got the reference? 😏

  • @myeverymusic
    @myeverymusic 5 років тому +1

    N/(2^x) = 1, so that 2^x = N, i.e. x = logN

  • @tyrisnolam
    @tyrisnolam 9 років тому +4

    I can't really find the video of Recitation 4, not even on the OCW site. Does it exist somewhere?

    • @mitocw
      @mitocw  9 років тому +2

      ranalynamic Sorry, Recitation 4 video is not available.

    • @chaitanyagurrapu
      @chaitanyagurrapu 5 років тому +1

      @@mitocw :'(

  • @MrWafa159
    @MrWafa159 10 років тому

    very good thanks :)

  • @arnobchowdhury9641
    @arnobchowdhury9641 5 років тому +4

    Why is not there a recitation lecture 4? :(

    • @mitocw
      @mitocw  5 років тому +9

      We are not sure why. We checked the authoring database for notes, but nothing was listed. There are a number of possible reasons: wasn't recorded (date/time was changed and the video crew wasn't notified), audio was bad/missing, recitation was not held... just to name a few.

    • @nickleefly
      @nickleefly 4 роки тому +3

      @@mitocw there is a recitation 4 video in Victor's channel, I think you can help to put it in this playlist

    • @ryanc7840
      @ryanc7840 2 роки тому +1

      @@nickleefly No, it's not. ua-cam.com/video/i9zdH3GtEf0/v-deo.html This was the uncut version of this video.

  • @nutelina
    @nutelina 2 роки тому

    What confused me is that right at the end there is talk of computing the minimum from more minima but isn't there a global minimum? (if you go left down the tree only)

  • @MrIglaq
    @MrIglaq 8 років тому +7

    i think, in 22.37 min lecturer draw complete binary tree, not full binary tree

    • @AustinCS
      @AustinCS 6 років тому +1

      Good catch that's definitely what he meant to say.

  • @keysangyonthan
    @keysangyonthan 3 роки тому

    can anyone please send me the link to insertion of BST

  • @visheshsinha_
    @visheshsinha_ 3 роки тому

    42:21 Deletions

  • @shalabhsingh7943
    @shalabhsingh7943 6 років тому

    Could u pls provide the link for insertion and search 2

  • @TheDeIirium
    @TheDeIirium 8 років тому +1

    10:03 ... still waiting.

  • @polycoder
    @polycoder 3 роки тому

    if we can hold data in array and linkedlist why would we need Trees for store /delete /update operations?

    • @koyanischannel3001
      @koyanischannel3001 3 роки тому +1

      U can't do binary searh tree in linked list but can insert/remove quickly;
      And u can do binary search in sorted array but can't remove/insert quickly (u have to move the entire array),
      So binary search tree is a way to solve that problem.
      It is explained in a video about binary search tree that is also from this channel but from a later course iirc

    • @koushikvss7638
      @koushikvss7638 3 роки тому

      @Nasy Rest That question is dealt with in great detail in 5th lecture of this course. And reply by Koyanis is a good summary of that

    • @polycoder
      @polycoder 2 роки тому

      @ZackTactical34 thank you

  • @zeynepsedabirinci1409
    @zeynepsedabirinci1409 5 років тому +1

    How can I reach the problem sets that he talks about? thanks

    • @mitocw
      @mitocw  5 років тому +1

      You can see the course materials on MIT OpenCourseWare at: ocw.mit.edu/6-006F11. Best wishes on your studies!

  • @smthhappy
    @smthhappy 5 років тому

    Does anyone have the code he talks about?

    • @mitocw
      @mitocw  5 років тому +8

      The notes and code files are available in the full OCW course site: ocw.mit.edu/6-006F11. Open up Recitation 5 in the tabbed video player, and click on the "Recitation Notes" tab for materials related to the session. Good luck with your studies!

    • @Nhatn-de5nz
      @Nhatn-de5nz 4 роки тому

      @@mitocw OCW off-center wicked. Thanks!

  • @abhraneilchandra8147
    @abhraneilchandra8147 8 років тому

    What is order H??

    • @gibsonnathan
      @gibsonnathan 8 років тому

      The height of the tree

    • @isaacfife
      @isaacfife 5 років тому

      H is the height of the tree, which in a BST is not guaranteed to be log(n) because a BST can be unbalanced, thus O(H)

  • @Vmaster1
    @Vmaster1 11 років тому

    why

  • @randalllionelkharkrang4047
    @randalllionelkharkrang4047 3 роки тому +1

    For the degenerate unbalanced tree that keeps going to the right, why is O(N) for searching? i mean its ordered right since it keeps increasing, so we can still using binary search right?

    • @luizfelipels7
      @luizfelipels7 3 роки тому +3

      The degenerate tree is like a sorted list indeed.
      But binary search only applies to arrays, which give you random access.
      Random access means you can access any element at constant time.
      With trees or lists, you can't do that; you have to follow the pointers.
      That's why you can't use the binary search algorithm.

    • @christopherharsh
      @christopherharsh 2 роки тому

      @@luizfelipels7 100% true. a good word for this is being indexable

  • @Dentarthurdent54
    @Dentarthurdent54 11 років тому

    Way to flood my sub box, guys -_-

  • @dragon_warrior_
    @dragon_warrior_ 4 роки тому

    BST implementation in py ♥
    github.com/RaviPabari/DataStructures-Algorithm/blob/master/Tree/Binary%20Search%20Tree/BST.py

  • @tomislavhoman4338
    @tomislavhoman4338 8 років тому +1

    59:00 Nobody will find out that you told people how to do it for everything. We'll keep it a secret :)

  • @stanleyqqq7
    @stanleyqqq7 10 років тому

    hellow anyone to sugegst me book with solved exercises in recutions??i be grateful for that help!!thanks

    • @mitocw
      @mitocw  10 років тому +5

      This course does feature assignments with solutions. See ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/assignments/ for details. We hope this helps.

  • @ahmidahmid9303
    @ahmidahmid9303 4 роки тому

    good explanation not perfect but just good enough

  • @ahmidahmid9303
    @ahmidahmid9303 4 роки тому

    good explanation not perfect but just good enough