Binary Tree in Data Structures | All about Binary Tree | DSA Course

Поділитися
Вставка
  • Опубліковано 8 лют 2025
  • Notes of this Lecture: docs.google.co...
    🔴 Alpha Placement Course - bit.ly/3oqidsd
    Topics :
    00:00:13 - Introduction to Trees
    00:04:00 - Binary Trees
    00:08:56 - Quiz Question
    00:11:37 - Build Tree (from Preorder)
    00:18:30 - Preorder Traversal
    00:24:20 - Inorder Traversal
    00:27:38 - Postorder Traversal
    00:30:40 - Level Order Traversal
    00:40:52 - Count of Nodes
    00:46:45 - Sum of Nodes
    00:49:54 - Height of Tree
    00:54:02 - Diameter of Tree (Approach 1)
    01:03:30 - Diameter of Tree (Approach 2)
    01:10:41 - Subtree of another Tree
    01:20:29 - Homework Problem Hint
    🔥Java Placement Course : • Introduction to Java L...
    🔥Complete C++ Placement Course (Data Structures+Algorithm) : • C++ Full Course | C++...
    🔥Telegram: t.me/apnikaksh...
    🔥Instagram: / dhattarwalaman
    My UA-cam Gear 😉: docs.google.co...

КОМЕНТАРІ • 749

  • @vinaysingla3241
    @vinaysingla3241 3 роки тому +36

    I thought this channel only became a guidance and motivation channel. Glad to see a teaching content after so long.

  • @rushikeshchoudhary5920
    @rushikeshchoudhary5920 2 роки тому +22

    Hey shraddha , I just completed this compelte series on java and it was the most amazing thing i had ever learnt.
    I request you to plz continue this series and also bring lectures on advance java topics. I really love the way you teach and your relly INSPIRING.
    THANKYOU for the effort your taking to tech us.

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

      Isme ye nhi samjh aa rha, sumofnode and countof node dono me ham specify to kiye nhi ki node ko count karna h ya node ki value ko, to apne aap kaise return kar rha h sahi value

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

      @@shivamvishwakarma7864 count wale me last me 1 se increment kiye hai aur sum wale me root.data se kiye hai
      yahi se differentiate ho reha hai

  • @sreejhari554
    @sreejhari554 3 роки тому +630

    Ma'am I request you to post videos on java + DS as fast as possible. These are really helpful.

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

      You are absolutely right

    • @CsTechworld
      @CsTechworld 3 роки тому +5

      @@harshalbadgujar944 bro playlist are incomplete.

    • @hitishachouhan442
      @hitishachouhan442 3 роки тому +5

      Yes mam same request

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

      Maam please make video on graph
      Two pointer and sliding window just u did in C++ course that is really helpful

    • @dheerajsharma5074
      @dheerajsharma5074 2 роки тому +2

      Aap fast kar ke dekh lo

  • @Smart_Consumer1
    @Smart_Consumer1 2 роки тому +10

    Beautifully explained and was really easy to understand for someone from non coding background 🎉

  • @shruthi873
    @shruthi873 2 роки тому +17

    mam ur videos are to the point and directly just absorbed to head...pls post videos on this java dsa regularly mam...it is veryyy useful

  • @Aqirlone
    @Aqirlone 3 роки тому +17

    Please complete this series as soon as possible please .we really need it .

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

      For easy learning of searching algorithm...do watch
      ua-cam.com/video/qioO9aiozjk/v-deo.html

  • @mitanshimandloi5803
    @mitanshimandloi5803 2 роки тому +119

    Mam, this java + DS playlist is amazing. It helped me a lot.
    I request you to complete this playlist as soon as possible. It will be very helpful.

  • @alvaaaas
    @alvaaaas 2 роки тому +31

    Amazing content ma'am ☺️ lots of respect to you guys and especially Shraddha didi for such an awesome teaching skills

  • @User-ko5hu
    @User-ko5hu 3 роки тому +187

    Hey Ma’am, Your content is on a level far beyond anyone!
    I want to put a little request:
    If you could please make a 1.5 hour long video on stack and queues with all the important concepts and questions(easy, medium and hard) including in it and also cover interview oriented questions(kinda crash course type).

    • @Cool96267
      @Cool96267 3 роки тому +7

      Much required

    • @ritik6947
      @ritik6947 3 роки тому +12

      +1, A single video which can help in revising the concepts, Much Required !

    • @adarsh2879
      @adarsh2879 3 роки тому +5

      @@Cool96267 agreed much needed

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

      True...stacks nd queue...

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

      +++100

  • @HemantSharma-qx6vl
    @HemantSharma-qx6vl 2 роки тому +9

    The only platform i have learnt in the simplest way.
    Thank you ma'am

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

    You are directly working on efficient techniques. For beginners it’s not easy to understand.
    Write code for naive approach and then teach efficient method.

  • @Leo-hz-u8j
    @Leo-hz-u8j Рік тому +21

    No doubt Shraddha didi has a decent way of teaching which is very rare nowadays. She makes it easy for the student to adopt the concepts and most importantly, my brain doesn't ache after this rather I get interested to practice more of it.

  • @vinaybilla2953
    @vinaybilla2953 11 місяців тому +3

    U r so brilliant dhidhi
    Ur style is different
    I am learning all dsa from ur java course
    Now iam in binary

  • @amrithnath8528
    @amrithnath8528 3 роки тому +54

    Mam can you do a series on aptitude ,logical reasoning ,verbal ability like that you done c++ complete placement course because so much companies are now needed these topics
    for placement like tcs nqt ...
    So much work questions under each video as pdf.Its a very helpful all including college students... Then the placement package is also be a complete one ..

  • @ayushsinha1909
    @ayushsinha1909 3 роки тому +51

    Complete the java course asap!! Really helpful and easily understandable

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

      everywhere we consider root of binary tree as level 0 but here,why is she considering it as level 1,the concept is wrong ?

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

      @@harshsulakhe2720 pehle vid dheka kro fir gyan dia kro

  • @thirumalainambi6068
    @thirumalainambi6068 10 місяців тому +2

    tbh it was the best ever video apna college made Trees respect++

  • @goprothink4517
    @goprothink4517 2 роки тому +5

    I know/think you have a reason to not upload any lectures video, but you have understand that many learners are connected to this course and depend on this because they are used to your teaching techniques and now they are helpless. At least you tell us time or reason so that we can move on and save us precious time. Thanks for teaching us.

  • @priyanshuvettori5179
    @priyanshuvettori5179 2 роки тому +5

    I have never seen a better explainer

  • @shuvoahmed5217
    @shuvoahmed5217 2 роки тому +5

    Her level of explanation is outstanding ❤️🌼

  • @creativitypoint7046
    @creativitypoint7046 2 роки тому +5

    Plzzz, upload next part ASAP. The whole playlist was very helpful. Thanks

  • @samrinshaikh9760
    @samrinshaikh9760 24 дні тому +1

    mam you are most tailented .....i respect

  • @sachinprasad6324
    @sachinprasad6324 3 роки тому +5

    This is the best video related to tree(DSA) I have ever came across., Thank you ma'am for this. Lost of love. Increament++;

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

    I am very lucky to get this video, really helpful it makes me able to understand how to use recursion and queue and think about tree questions. Thanks Shraddha Di. Keep it up with different content . Best wishes from my side

  • @istkaarali1993
    @istkaarali1993 2 роки тому +10

    Mam, this java + DSA playlist is amazing. It helped me a lot. Thanks a lot. Ma'am I request you to post videos on java + DSA as fast as possible. These are really helpful.

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

    mere college me just trees start hua and mai pahle ki video dekhi thi aapki and trees soch hi raha tha kaha se karu and lo aapki video aa gai .. thankuuu

  • @memeistan711
    @memeistan711 3 роки тому +15

    Ma'am I'm big fan of you .
    I'm from Balochistan, Pakistan .
    I'm BS English student but now I'm learning coding and programming so your lecture very helpful to me .

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

    Please keep uploading videos regularly and finish this playlist fast

  • @shivamdandekar1024
    @shivamdandekar1024 3 роки тому +24

    try to cover all topics don't miss anyone because he is very complicated topics and discuss the interview questions for tree ...
    little bit competitive programing questions

  • @daya_ashiquiwala_status
    @daya_ashiquiwala_status Рік тому +1

    Aap Explain bahut acche se karti hai

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

    Ma'am awesome video .Really helped me understand the topic deeply in class 12th.

  • @CRICTHAT11
    @CRICTHAT11 Рік тому +6

    In diameter ques diam3=height(root.left)+height(root.right); bcoz we are counting edges in this ques and height basically gives us no. of nodes so we don't need to add 1 to it.

    • @NidhishAbraham
      @NidhishAbraham Місяць тому +1

      𝗛𝗘𝗜𝗚𝗛𝗧 𝗢𝗙 𝗔 𝗡𝗢𝗗𝗘: The height of a node is the number of edges on the longest path from the node to a leaf. For a node n: 𝗵𝗲𝗶𝗴𝗵𝘁(𝗻) = 𝟭 + 𝗺𝗮𝘅(𝗵𝗲𝗶𝗴𝗵𝘁(𝗻.𝗹𝗲𝗳𝘁),𝗵𝗲𝗶𝗴𝗵𝘁(𝗻.𝗿𝗶𝗴𝗵𝘁))
      𝗗𝗜𝗔𝗠𝗘𝗧𝗘𝗥 𝗢𝗙 𝗔 𝗡𝗢𝗗𝗘: The diameter at a node is the sum of the heights of its left and right subtrees: 𝗱𝗶𝗮𝗺𝗲𝘁𝗲𝗿 𝗮𝘁 𝗻𝗼𝗱𝗲=𝗵𝗲𝗶𝗴𝗵𝘁(𝗻.𝗹𝗲𝗳𝘁)+𝗵𝗲𝗶𝗴𝗵𝘁(𝗻.𝗿𝗶𝗴𝗵𝘁)

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

    zndgi m pehli baar tree smjh aaya hai thanks for this lecture

  • @vivekpaliwal1876
    @vivekpaliwal1876 2 роки тому +7

    You should make 3 hours vedio for each topic and it's all imp interview questions. For example binary tree and all its 20 important interview questions with solutions explained

  • @bhagvatawargand8159
    @bhagvatawargand8159 2 роки тому +2

    Please update course on regular basis,
    It is very helpful

  • @chaitanyalohar9308
    @chaitanyalohar9308 3 роки тому +8

    Thanks for continuing this series...

  • @stackoverflowed5872
    @stackoverflowed5872 2 роки тому +8

    Another level of explanation 💯✅

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

    Good explanation with code
    I am very happy 😊😁
    Thank you very much

  • @aasiz_online7999
    @aasiz_online7999 2 роки тому +13

    Please complete this awesome series. Some videos on Hashmap, graph and DYnamic programming etc whenever you get time if possible as soon as possible

  • @avneez1631
    @avneez1631 3 роки тому +33

    Plzz teach us how to take input in different ways like the driver code instead of just using direct values. It will be helpful for us for full function problems. Btw I really liked it. Everything's clear. 💥💯

  • @ChandanKumar-xd1tg
    @ChandanKumar-xd1tg 2 роки тому

    DSA bhut easy way samjhate ha mam ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

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

    I love your teaching ma'am

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

    I was waiting this video many time 🥰🥰

  • @misbahmirza1277
    @misbahmirza1277 Рік тому +1

    Mam your teaching skill is fabulous... The way you teached us... It's really Appreciatable... Your hard works... Your skill... Your consistency.. Your taughts all are fabulous.. Really really big fan of yours..may God bless you shruddha mam....

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

    Really mam your teaching way👌 maja aa gya bhut acha explaine lete ho

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

    Please upload videos daily and please solve more problems and mention questions 🙏🏻

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

      For easy learning of searching algorithm...do watch
      ua-cam.com/video/qioO9aiozjk/v-deo.html

  • @AbhishekChoudhary-fu2ng
    @AbhishekChoudhary-fu2ng 2 роки тому

    U teach very well in a very easy to understandable way👏👏👏👏

  • @ziyan.pati9
    @ziyan.pati9 2 роки тому +3

    These content is so valuable. Please upload more videos on DS + JAVA.

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

    Di I watched this video and it cleared all my doubts regarding trees thank you so much. I have one request can you solve more problems on binary trees asked in amazon, google, microsoft and other product companies please it will be really helpful. Also other traversals as well like zig zag traversal 😊😊😊😊

  • @iamritikdongre
    @iamritikdongre Місяць тому

    Thank you so much 🙏❤ I have understood the binary concept well.

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

    Thank you mam, from the bottom of my Heart.

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

    I request you to upload the video on java + DS as fast as possible. Really helpful and easily understandable

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

      For easy learning of searching algorithm...do watch
      ua-cam.com/video/qioO9aiozjk/v-deo.html

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

    Hello Mam, my study is paused. Please post the next lesson. Thanks a lot for your efforts and god bless you for all the happiness

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

    Shradha Di for You:"Ye kitni Awesome h Yar"

  • @13-xiibsundram39
    @13-xiibsundram39 3 роки тому +3

    Thankyou for posting the next video but please try to complete the series as fast as possible we are waiting for the next video.

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

    This is a part of graph theory... It is a important course in Mathematics

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

    Great Teaching seems like more than 10 years experience but 2020 pass out incredible

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

      For easy learning of searching algorithm...do watch
      ua-cam.com/video/qioO9aiozjk/v-deo.html

  • @MdAfroj-ff8in
    @MdAfroj-ff8in 2 роки тому

    Waooo thank you so much, mai avi avi apka ye trees ka video dhund raha tha😍

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

    Love the way you teach.....

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

    Thank you so much ma'am very helpful video 😊

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

    Your all videos are so helpful for us

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

    I like the way of your explaining di.. chutaku sa task 😄

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

    Ma,am your class is amazing

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

    Thanks for the lecture!! was able to solve the homework question.

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

    tqq diii😍😍😍

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

    Shraddha didi and aman bhaiya i love both of u u guys are doin amazing work but it's my humble request to complete this playlist I am waiting from last 1.5 months u guys are bringing new tutorials of new languages (they are also amazing) but u have forgot bout this playlist so plz complete it as soon as possible 🙏🖤
    BTW u guys are amazing lots of love 🖤

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

    Very helpful video ! Thanks Shraddha ma'am !

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

    Very helpful video & Thank you sradha didi ❤!!!!!!!!!!!!!!!!

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

    Great explanation ...🪄

  • @vivekprajapati1584
    @vivekprajapati1584 4 місяці тому +5

    you have missed if(idx

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

    While watching this video I kept remembering the DOM being a developer I work with it almost daily and yo boiii it's actually a tree 👍🏼

  • @nikstatus0735
    @nikstatus0735 2 роки тому +2

    waiting for next video!!

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

    Watching you isn't boring!😄

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

    Mam aap bhut great ho.....👍👍👍👌👌

  • @Ahamad381
    @Ahamad381 3 роки тому +18

    Mai bhi soch rha tha bhi vedio didi jald se jald banayen 🍟💕💕💕💕

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

    Every problem can be viewed as pre post or inorder traversal. Count of nodes, sum of nodes, height of tree, diameter = post order,

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

    please finish it fastly i'm very excited!

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

    Teaching style is good ✨🙏

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

    Perfect teaching thank you for guide in hindi especially

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

    Thank you mam very much for this course...... Please mam complete this couse for competitive coding also🙏🙏🙏as u did in c++ course.... Its a humble request to complete it as soon as possible mam please 😭🙏

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

    I requested you Guys is courses pr bhi thoda sa focus kiya jayee....because a lot of students focusing on java as well.

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

    Outstanding diii.. Upload more DSA Video Tutorial.. Please🙏🙏🙏

  • @keerthi1070
    @keerthi1070 2 роки тому +2

    Great work, keep it up gal :)
    But you have missed few corner cases, tell me if you want to know.

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

    Thanks didi aapne teachers se bhi accha samjhya

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

    YA pls complete this as early as possible plssss.....🥺

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

    very informative, thankyou Shraddha

  • @soumiksarkar7511
    @soumiksarkar7511 2 роки тому +9

    Hi Shraddha,
    I have a doubt here. In IsIdentical part at 1:17:51, if subRoot is on leaf but root is not on leaf then also it should be a part of the tree right.
    Say rootNodes array in preorder sequence is { 1, 2, 4, 6, -1, -1, 7, -1, -1, 5, -1, -1 3, -1, -1} and subNodes array is {2, 4, -1, -1, 5, -1, -1}. In that case also subNode tree is valid.
    But with this if(root == null || subroot == null) return false; would eliminate this case right?
    Can you please explain this? It would be very helpful.

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

      nhi bhao degi bhai, tu gentz hain na

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

      @@archishmangupta2787 🤣🤣

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

      nice question dude, i want reason too, even leetcode don't have those kind of test cases

  • @raavananrocks4237
    @raavananrocks4237 2 роки тому +2

    Pls complete this series 🔥❣️❣️❣️

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

    Didi you are my inspiration😁

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

    very helpful

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

    wow superb explanation

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

    Hi, Thanks it's very useful. Please make in English too if possible.

  • @careerpages740
    @careerpages740 2 роки тому +2

    Please update course regularly

  • @MuhammadUsman-kf6sm
    @MuhammadUsman-kf6sm 3 роки тому +1

    1 short videos are too much best way to learn smartly and effectively, hope to get one 🕐 on all main dsa topics

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

    Thank you for your efforts

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

    Hello didi..your videos are really amazing. I am learning better from ur teachings... Than my university...I have a small request as soon as possible will u pls upload ADSA videos also..!! It will be very helpful for us

  • @HimanshuSharma-ql4gm
    @HimanshuSharma-ql4gm 3 роки тому +7

    Didi plz complete the full stack web development course, it had been stopped at React js from so many days

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

    Mam Plz continue DSA SERIES.

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

    Mam please add the further videos(Dynamic Programming) on this playlist . This playlist is very helpful for us .

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

    Thank you didi very helpful video God bless you keep it up,

  • @manojshukla8627
    @manojshukla8627 Рік тому +1

    Hi Shraddha, I've a question here regarding 'count nodes' problem. Counting number of nodes using recursion and level order (using queue) both runs in O(n) time but then why in actual level order takes less time then recursion when submitting the problem be it leetcode, codechef or any other coding platform?
    For eg - Tree -> [1,2,3,4,5,6]
    Time with Recursion - 28 ms and time with level order - 16 ms

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

      In general, DFS is faster than BFS. This is because DFS only needs to keep track of the path from the root node to the current node, while BFS needs to keep track of all the nodes that have been visited. This difference in memory usage can be significant for large trees