5.11 Construct Binary Search Tree(BST) from Preorder example |Data Structures & Algorithm

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

КОМЕНТАРІ • 158

  • @soutrikgun9133
    @soutrikgun9133 4 роки тому +28

    You are a superb teacher ma'm. Because you have a good grasp on clear precise use of the language while not sounding abstract at all. You don't waste time doing peripheral things and put that time into clarifying the concepts very systematically. I wish you all the very best in all the things you do.
    In a country like ours, students feel so happy when a teacher does his/her job right because it is not the rule, it's the exception. Thanks for reviving my hope.

  • @princejunior4330
    @princejunior4330 3 роки тому +11

    When i started dsa it was very difficult and i suddenly watched this video it was so easy now after watching every single video of yours on dsa i learned a lot and finds dsa is one of the most easy subject keep doing u r the best teacher i ever met

    • @saurav.mishra528
      @saurav.mishra528 5 місяців тому

      Bhai ye college level hi hai asli dsa tough hi hota hai

  • @cdeba9867
    @cdeba9867 4 роки тому +31

    thanks from miami :)

  • @miogallobianco1
    @miogallobianco1 4 роки тому +7

    Thank you! It was very helpfull.
    I also loved that you sometimes speak in your language and say 'tike' in order to 'ok' I want to answer you in my language 'Peki'.

  • @dar4371
    @dar4371 5 років тому +19

    Best learning expreince from my view

  • @ChandraShekhar-by3cd
    @ChandraShekhar-by3cd 5 років тому +9

    Best Explanation in World!

  • @raman-jn6yt
    @raman-jn6yt 4 роки тому +40

    In short:
    In-Order traversal of any BST is Sorted data in ascending order.
    To find ROOT - take help of Pre-Order traversal.
    To find Left & Right sub-trees - take help of In-Order traversal.

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

      that's O(nlogn) approach. you can find in O(n) also

    • @phanigaming4887
      @phanigaming4887 Рік тому

      ​@@charan775 u do video on that

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

    I like your explaination of inorder in that it gives you an ascending order.

  • @ravalisaienugandula3900
    @ravalisaienugandula3900 9 місяців тому +2

    Mam we can simply construct it directly using pre-order only ,there is no need to find inorder if we find and construct then
    It is same as constructing binary tree from pre-order and inorder.

  • @ayushsuryawanshi5985
    @ayushsuryawanshi5985 Рік тому

    She is teaching to my soul directly.

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

    Superb!!!❤️❤️❤️Thanks a zillions! ❤️❤️......how you are amazing as teacher i can't express

  • @cs-atulkumartripathi4865
    @cs-atulkumartripathi4865 3 роки тому

    Mam jab aap fluently English ke bich mein hindi bolte hai to bhut accha lagta hai ki aapko hindi bhi itna accha aata hai 🥰🥰🥰🥰🥰🥰😍😍😍😍

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

    You are super ma'am.....
    You can teach in hindi and english both also......
    You are best👍👍👍

  • @meghaharlalka
    @meghaharlalka 5 років тому +7

    excellent explanation. loved it. Thanks

  • @zaidabdulkarim2125
    @zaidabdulkarim2125 4 місяці тому +1

    Amazing explanation you can not find something like that!!! small note: i don't know if i'm wrong or you did a mistake but at min 6:10 17 , 18 should be to the right but on the other hand it makes sense that because it is a bst so smaller on the left and larger on the right so which is correct?

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

    Thanks alot ma'am i am cse student but i never understood the data structure this easliy before but now i happy as after watching your videos i am easliy able Learn this things.

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

    finally tick mil gya . congrats maam keep go ahead and make videos ..thankuhh!!

  • @rahuldeshpande3516
    @rahuldeshpande3516 9 місяців тому

    Great video! Actually this is not needed though. You can simply consruct BST from pre order traversal alone. Pre order is the order in which elements were added to make the BST so it works independently.

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

    best explanation . made me to watch your all playlist

  • @explore_with_shanu
    @explore_with_shanu 4 роки тому +8

    Ma'am we can easily make BST by preorder only by remembering rule of BST

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

      yupp we can, but that solution will be of order O(nlogn), as you have to traverse from root everytime (log-n) for n nodes.

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

    *The attitude, killing* 😍😍😍

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

    Thank you very much. You are a genius. 👍👍🔝🔝👌👌🙏🙏

  • @abhishekabhi3252
    @abhishekabhi3252 Рік тому

    Thanks mam you are born in combination with beauty & brains

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

    I wish you were my lecturer, actually make this fun to learn

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

    Brilliant explanation! Thank you so much!

  • @sachinkulkarni9108
    @sachinkulkarni9108 4 роки тому +4

    One can simply find the BST only from pre order or post order. By definition, all the elements in the left subtree of a node are smaller than the node and the ones in the right subtree are greater than the node. It would be efficient while actually writing the code.

    • @AdityaSingh-ql9ke
      @AdityaSingh-ql9ke 2 роки тому +2

      It will work only if you are given numbers, consider if u were given alphabets, then it won't be possible.

  • @YasirKhan-bl8lj
    @YasirKhan-bl8lj 4 роки тому +1

    You Made it Easy, Thank you very much.

  • @mia4224
    @mia4224 Рік тому

    You explain it so well! Thankyou

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

    Thank you mam this video is very helpful full ...

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

    It's very useful madam. Nice explanation

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

    Thanks a lot it's very helpful for me 😊 for understanding BST construction

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

    Super teaching skill......

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

    Best teaching......

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

    thank u for saving our asses

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

    Super explanation...👌👌👍

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

    Very much thankfull to you for such a wonderful teaching

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

    Hi can you please also explain the code of all these problems?
    Im not preparing for GATE ...but for interviews.
    In interviews... we have to do the live coding.

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

    I never learnt it in my college. Thanks mam.

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

    Explained 👌🏻👌🏻👌🏻
    Ese Lagta h har waqt, Jese aap abhi hans doge 😅.....

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

    All videos are helpful ....Thanku mam 🥰🥰

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

    Mass🔥🔥 explaination mam thank u

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

    Very cleary explaination

  • @ChandraShekhar-by3cd
    @ChandraShekhar-by3cd 5 років тому +1

    Mam Just had a request if you could suggest some online materials or book to improve algorithms and get the understandings of problem solving like you!

  • @sudharshandinnu3988
    @sudharshandinnu3988 2 роки тому +15

    She is so cute

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

    It helps me a lot ma'am
    Thank you

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

    Thanks mam. Very good explanation.

  • @24_bhagyashreekanamadi70
    @24_bhagyashreekanamadi70 3 роки тому

    Best teacher

  • @AnujKumar-tt5md
    @AnujKumar-tt5md 4 роки тому

    Super explanation.. Thanks🌹

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

    thank u ma'am ❤️❤️❤️

  • @ساراعبدالهاديكريمالسليمي

    thanks for this clear explaining

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

    Awesome 👌 😮

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

    thank you very much

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

    Really u save me

  • @renukas3223
    @renukas3223 Рік тому

    Thank you madam

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

    Mam but this is not binary search tree it doesn't follow the rules of it as in right sub tree height of 60 is -2 which is not under the condition of bst. Have we use LR AND RL to make it BST? Please reply mam. BTW your videos are so good I have already subscribed your channel

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

    Thank you so much ma'am!😊😊

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

    *Mam please guide me . I am good learner and only follows your lectures. Please mam tell me how the coding part can be done*

  • @arnoldsmith6584
    @arnoldsmith6584 Рік тому

    good explanation

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

    Thanks mam

  • @iscaqfaizal7734
    @iscaqfaizal7734 Рік тому

    Useful....

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

    thanks for the tutorial

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

    Thanks, keep going.

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

    Mam you look soo good🥺

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

    your explanation awesome but kindly divide and conquer ki binary search and linear search tree share krde......

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

    Thanks for saving my exam, mam, you are really cool!

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

    Thank u

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

    hi, jenny . is it necessary to find out in-order traversal to construct the bst ? if we have given pre-order / post-order travesal .. can't we construct bst with either pre-order or post-order only... ?

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

    👌👌 explanation

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

    Thnku mam

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

    My question is
    The post order traversal of a binary tree is D E B F C A .find out the pre order traversal????

  • @HelloWorld-br5qg
    @HelloWorld-br5qg 3 роки тому +4

    Ma'am when we have numbers equal to node elements, do we duplicate them? Or ignore them?

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

      duplicate nodes are not allowed in BST(mostly)

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

    Thanks

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

    Madam,is programs are important for trees and graphs topic???
    Please reply madam

  • @studywithriyagupta1259
    @studywithriyagupta1259 5 років тому +2

    Mam cplus plus ke bhi bnado lecture plzz

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

    Plz make a playlist on oops concepts in c++ as no good content is available yet

    • @TheMR-777
      @TheMR-777 3 роки тому +1

      OOP in C++ is just a Design Pattern. First, learn all the Basics of C++, then Have some understanding of Encapsulation, Abstraction, Inheritance, and Polymorphism. Then watch some videos of TheCherno. You will be good to go.

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

      @@TheMR-777 I Agree,

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

    super thankyou mam

  • @continnum_radhe-radhe
    @continnum_radhe-radhe Рік тому +1

    🔥🔥🔥

  • @Elias-hj7yv
    @Elias-hj7yv 4 роки тому

    verrrrrrrry niceeeeeee thx

  • @charanchandu7622
    @charanchandu7622 11 місяців тому

    Your explaination was so good and you are too cute

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

    take care c u....in 5.12

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

    Could someone explain me why in the left root 60 is put first in front of the 85? why 85 is on a lower branch compared to 60?

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

      Because 60 comes first in Pre-order and 85 is greater than 60 so, 85 will become the right child of 60.
      In BST the left child has smaller value than the root and the right child has greater value than the root.

  • @alexomelak4200
    @alexomelak4200 Рік тому

    Hello Madam... i want a program that insert ,search and displays elements of BST. i didn't got on your video is there??? please help me

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

    Cute mam 😍👌👍

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

    Mam u are so beautiful ❤️❤️❤️

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

    What is it for + * - and abc is in question

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

    I understand bst formation but don't know how u write Inorder when preorder is given only.

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

    Mam what are the applications of Binary Search tree?

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

    Nothing can replace a whiteboard✌

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

    mam, how to solve problem when only inorder is given?

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

    But when only inorder is given then how can we find pre and post

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

    If they give pre order and post order. How ll create bst?

    • @JennyslecturesCSIT
      @JennyslecturesCSIT  5 років тому +7

      First find inorder and then take a pair of either pre-order and inorder or postorder and inorder .. and construct bst. ... if you write the given data in ascending order then that would be inorder of bst

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

    Jenny I am not able to join the channel...My payment method or any Card I am putting in, is not being accepted.

  • @continnum_radhe-radhe
    @continnum_radhe-radhe Рік тому +1

    Mam, how to make code for this...

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

    First root then it construct easily

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

    🖤🔥

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

    What should we do if any key value is repeated?
    Mtlb agr koi number repeat ho rha ho ga tou hum usy kaise BST mai store karin gay
    Plzz plzz reply
    If anyone know the answer plzz tell

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

      In a BST, repetition of a Particular value is strictly prohibited, all data are unique, else it can't form BST.

  • @nomeowzoey
    @nomeowzoey 5 років тому +2

    half of the views coming from UPES students. :P

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

    ❤️

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

    What is weight of this tree?

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

    ❤️❤️❤️❤️❤️