Construct Binary Tree from Preorder and Inorder Traversal | Complete Full Tree Data Structure

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • This is the video under the series of DATA STRUCTURE & ALGORITHM in a TREE Playlist. We are going to understand How to Construct Binary Tree from Preorder and Inorder Traversal
    Join My Telegram channel for more Updates: telegram.me/he...
    complete DSA preparation: github.com/Pri...
    ----------------------------------------------------------------------------------------
    ► 105. Construct Binary Tree from Preorder and Inorder Traversal
    Given two integer arrays preorder and in order where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.
    Input: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]
    Output: [3,9,20,null,null,15,7]
    We also Provide courses on Competitive Programming and Data structure and Algorithms. Please see our Full Playlist on our Channel.
    ----------------------------------------------------------------------------------------:
    Construct Binary Tree from Preorder and Inorder Traversal: leetcode.com/p...
    code in This Video: github.com/Pri...
    ----------------------------------------------------------------------------------------
    *Follow me *
    LinkedIn► / iamprince
    Facebook► / helloworldofficials
    Instagram► / helloworldbyprince
    Twitter► / prince_king_
    Telegram► telegram.me/he...
    ----------------------------------------------------------------------------------------
    ►Our Playlists on:-
    ► Tree: • Tree Data Structure & ...
    ► Hashing: • Hashing Data Structure...
    ► Matrix: • Matrix (Multidimension...
    ► STL: • Standard Template Libr...
    ► Leetcode: • LeetCode Solutions And...
    ►Competitive Programming: • Full course in Competi...
    ►C++ Full Course : • C++ full Course in HINDI
    ►Algorithms: • L-01 || Prefix Sum Arr...
    ►Data Structure: • Data Structures with C...
    ------------------------------------------------------------------------
    🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
    ✨ Tags ✨
    Construct Binary Tree from Preorder and Inorder Traversal
    The tree Data structure in Hindi
    Use of Tree Data structure in real Life
    question asked in Google
    off-campus placement
    how to learn to code for beginners
    Practice Tree data structure
    tree in data structure
    Complete course on Tree
    Tree in a data structure in Hindi
    Tree Full playlist for Beginners
    #Tree #Leetcode #programming

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

  • @Shadow-lx9rh
    @Shadow-lx9rh 2 ปีที่แล้ว +5

    Finally completed tree playlist
    Ur explanation was the best and easy
    And materials with links of code and problems were soo soo helpful
    Now i feel like I'm at intermediate level on solving tree problems
    Thank you soo much for your diligent efforts means a lot 🤝

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

    Dear Prince vai,
    I want to express my sincere gratitude to you for creating the incredible playlist on tree data structures. (As a Bangladeshi, Hindi is not my native language, but I understood your entire playlist with ease). Your clear explanations and organized content made it possible for me to grasp the concepts of tree data structures. Once again, thank you for sharing your knowledge and expertise.

  • @GudduKumar-fn8tb
    @GudduKumar-fn8tb ปีที่แล้ว +1

    After 5 days of consistency finally i have comlpleted
    your Tree playlist .
    Atlast i wannaa say to you that the
    way of your teaching is so good .
    many one is teaching on this platform but none one can match you
    thanks to bring this type of playlist.

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

    Playlist complete ho gayi bhaiya...kaafi confidence aya. Ab bus har video ke code dubara se practise karna hai.
    maja aa gya bhaiya ... baaki kisi aur ka playlist se smajah nahi aya but aapse sab samajh mai aya 😇

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

      waooo bro ... bhut mehnat kiya aapne bro good work

  • @GudduKumar-fn8tb
    @GudduKumar-fn8tb ปีที่แล้ว +1

    i think i got addicted to your way of teaching
    because i have started your video on wacthing from graph playlist ,
    but when i give a time to 2-3 videos of graph then i decided to cover all playlist of graph.
    i will succesfull in my way.
    but journey didnt stops here
    today is the day where i covered all videos of your playlist which is
    Graph, Sorting,STL,Heap,Hashing AND Tree...........
    i have always issue in non linear data structure after covering these playlist
    i am feeling much confident !!!!thanks bhaiyaa 😶

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

      Hahaha
      Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀

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

    I rarely do comments... but this channel has my heart.. jo code kahi smjh ni ata vo yha easy lgta h ... keep going sir and many thanks to you :)

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

    this is the best video i have ever found on this platform

  • @jatinkumar4410
    @jatinkumar4410 7 หลายเดือนก่อน

    Amazing explanation. Thank you

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

    Kaaafi achii explaination hai....Great contribution towards education

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

    Thodi takleef hui par yeh try karke accha laga ,thanks

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

    the best explanation on planet earth

  • @Vegeta-ew2bq
    @Vegeta-ew2bq ปีที่แล้ว

    Finally completed tree playlist
    Thanks Prince Bhaiya❤

  • @anshvashishth2081
    @anshvashishth2081 2 หลายเดือนก่อน

    Best explanation

  • @ss-md4qn
    @ss-md4qn 2 ปีที่แล้ว

    Super helpful. Best video on this topic . Very easy to understand.

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

    Prince bhai apki health acchi rhe h
    Aur aisi hi aap explain krte rhe

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

    Finally completed this series today🤟 thanks Buddy 🙃

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

    Thank you Brother🧡😇 really Superb explanation.......

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

    Keep uploading these kind of videos.

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

    at the end of the video pls mention the time complexity as it became an imp aspect of interview to code in the most optimized way

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

    Excellent teaching skills.. one doubt why binary search tree is not covered?

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

    koi ye btado ki hamne preindex ko globally kyu declare kra hai

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

      same doubt have you got the solution?

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

      We have globally defined it because we want to access the Preorder vector elements in sequence, if we do not define it globally then due to recursion calls our PreIndex value can get changed and the sequence would get disturbed

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

    Thanku :)

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

    Thank you Bhaiya

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

    explanation good!!!

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

      Thanks a lot
      Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀

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

    Thank you, bhaiya

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

    even i buys paid batch but your tree lecture is smazing

  • @PankajGupta-gh9cm
    @PankajGupta-gh9cm 2 ปีที่แล้ว

    instead of looping in inorder array every time we can create a hashmap of [ Inorder[index] , index ] so that we get the index of that element in constant time .

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

      yes bro u can do that as well
      can u please write down your code in the comment section of this video so that others can also understood

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

    sir please 1 video AVL tree pa banado with implementation using C

  • @yashpaunikar671
    @yashpaunikar671 6 หลายเดือนก่อน

    bhaiya pura dry karwana tha ye part (2,4) . mujhe jaha doubt aa raha tha vahi clear nahi ho paya

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

    Prince bhai Tree k Baad Graph please 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @mr.everything735
    @mr.everything735 ปีที่แล้ว

    bhai postorder ar inorder ka kaise kra ye to bta do'

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

      same method hoga yaar, bass thora sa looping alag trah se hoga postorder me Node last me hoga so start waha se karenge ...try and figure it out by yourself samhj me aa jayega

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

    bhaiya tree kr or kitne question ayiage

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

      Ab sayad end hai...aap graph start karlo
      Most probably 1-3 questions aur aayega

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

    Complete dry run to kr lete 🤦🏻‍♀️🤦🏻‍♀️

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

    bhi ajaan ka vakat video shoot mat kro plases