Binary Tree Introduction | C++ Placement Course | Lecture 27.1

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

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

  • @faizanqazi7004
    @faizanqazi7004 3 ปีที่แล้ว +73

    *Tree Data Structure:*
    1. Used to store data in a hierarchical manner.
    2. Example: File Explorer uses it maintain Folder & file structure in computer, DOM in HTML, comments
    3. Can have any number of children
    *Basic Terminology:*
    Root - Topmost node of the tree
    Parent - A node having successor is a parent of that node
    Child - A node having ancestor is a child of that node
    Sibling - nodes of same parent
    Leaf Node - Node which doesn't have any children
    *Binary Tree:*
    A tree where each node can have maximum two child
    *Properties of Binary Tree:*
    1. Maximum nodes at level L : *2^L*
    2. Maximum nodes in a tree of height H: *2^H-1*, where H is the number of levels
    3. For N nodes, minimum possible height or minimum number of levels are log2(N+1)
    4. A binary tree with L leaves has at least log2(N+1)+1 number of levels

  • @art3mixfake962
    @art3mixfake962 3 ปีที่แล้ว +78

    I love how she is trying her Best to give a Example which is " Professional " and " Not Hard to Understand " ❤️❤️

    • @NikhilYadav-co5sc
      @NikhilYadav-co5sc 3 ปีที่แล้ว +11

      Bhai padh le pyar mohhobat ke chakar mai mat padh

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

      @@NikhilYadav-co5sc true 😂

  • @jagritrattan4513
    @jagritrattan4513 3 ปีที่แล้ว +8

    Very well teached and explained..
    When I saw any video then everytime I satisfied with the content, explaination and the path established for learning the topic.
    Keep it up..
    Name of this channel is Right...
    Apna college

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

    Dii aap sab se acha samjhate ho❤️

  • @Inzmamulhaq-ip9yq
    @Inzmamulhaq-ip9yq 2 ปีที่แล้ว

    Ap ka samjna ka andaz Kamal ka a

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

    Thanku soo much Bhaiya ji & Sir ji 🙏🏻 & Maam ji

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

    wow great explain didi

  • @aakashthakre244
    @aakashthakre244 3 ปีที่แล้ว +24

    #Apna college
    Sir/ Mam please make a video to how to practice questions from where to get question where to practice for beginners who have learned upto oops so that we have grip on previous topics
    Those who think a video must be made on this please like this comment so it get noticed

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

      try questions on coding ninjas, because they are free and selected question , after doing those question you can focus on competitions or development

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

    This is my favorite data structures

  • @HustleKaro24
    @HustleKaro24 3 ปีที่แล้ว +9

    Family hierarchy is the best example for tree☺
    Binary tree is the best example of two child policy 😂😅

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

    best best content love from pakistan

  • @DawoodRizwan-k7f
    @DawoodRizwan-k7f 5 หลายเดือนก่อน

    so good tech...

  • @AbhishekKumar-on3iy
    @AbhishekKumar-on3iy 3 ปีที่แล้ว +3

    Happy Birthday Aman bhaiya🎂🎉🎉🎂🎉🎉🎂🎉

  • @sagarpatil2142
    @sagarpatil2142 3 ปีที่แล้ว +6

    Here we use level from 0 but in maximum nodes formula is assuming level from 1 it has to be 2^(h+1)-1 if root node is at level 0.

  • @_Deepak__Verma
    @_Deepak__Verma 10 หลายเดือนก่อน +3

    Can't we use class for creating a node instead of struct as we done in the past lectures like linked list, stack, queue etc.

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

    Amazing i create a tree first time and i amazes with their teaching style and really helpful for my exams thank didi

  • @HimanshuSingh-zu4ht
    @HimanshuSingh-zu4ht 3 ปีที่แล้ว +3

    some of topices in binary tree were not taught
    such as implementation of binarytree
    here is my code for that
    #include
    using namespace std;
    template
    class BinaryTreeNode{
    public:
    T data;
    BinaryTreeNode* left;
    BinaryTreeNode* right;

    BinaryTreeNode(T data){
    this->data = data;
    left = NULL;
    right = NULL;
    }

    ~BinaryTreeNode(){
    delete left;
    delete right;
    }
    };
    void printLevelWise(BinaryTreeNode* root){
    if(root == NULL){
    return;
    }

    cout

  • @VishalSharma-ys9wt
    @VishalSharma-ys9wt 3 ปีที่แล้ว +7

    A binary tree with L leaves has at least log2(L) + 1 number of levels. Correction for point 4 in properties.

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

    Thank u so much👍👍👍♥️♥️♥️♥️♥️♥️♥️🥰

  • @AyushGupta-my4ck
    @AyushGupta-my4ck 2 ปีที่แล้ว +6

    kindly provides notes as soon as possible , because it gets very difficult while we are revising( and we have see the whole video again and it is a wastage of time ) ,so aman bhaiya pls upload the notes of all lecture.

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

    Thank you Didi 😊🙏💐

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

    This Man Is Going Crazy Keep It Up 😆 Thanks You So Much For All The Lectures❤️🙏

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

    Thank u didi😄

  • @Inzmamulhaq-ip9yq
    @Inzmamulhaq-ip9yq 2 ปีที่แล้ว

    I love you ma'am 💗

  • @vimalslab3398
    @vimalslab3398 3 ปีที่แล้ว

    0:30
    while(1){
    folder ke andar folder
    }
    ye technique to mai wo wali videos chupane k liye karta hu ;)

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

    finally binary tree aa gaya

  • @ArjunArjun-vw5fq
    @ArjunArjun-vw5fq 3 ปีที่แล้ว

    A powerful data structure is coming

  • @sadiakauser5643
    @sadiakauser5643 3 ปีที่แล้ว

    Too nice explained!

  • @SFAbhi9642
    @SFAbhi9642 3 ปีที่แล้ว +8

    CHALO TREE TO UGG GAYA AB FRUITS AANE BAAKI HAI ❤️❤️😎😎😀😀
    👍👍🙏🙏🙏🙏🙏🎉🎉🔥❤️❤️

  • @gauravsinghrathore9000
    @gauravsinghrathore9000 3 ปีที่แล้ว

    Wooo
    I like the way which she is explaining

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

    Why are we not using class in C++ to create Binary tree???
    Why are we using structure instead of class ???

    • @abdullahyto
      @abdullahyto 4 หลายเดือนก่อน

      you can use class dude

  • @adityaagarwal2324
    @adityaagarwal2324 3 ปีที่แล้ว +4

    Didi, struct word is not been taught by you in past,plz explain it. Is it similar to class???

    • @anujbhatt5933
      @anujbhatt5933 3 ปีที่แล้ว

      yess.... its very much similar...

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

    What is struct?

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

    Sir starting music is a very irritating one.
    But overall thanks for this playlist 😍😍😍
    Ab to PHOD DENGE 😁

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

    How will take input form user in BST

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

    struct Node
    {
    /* data */
    int data;
    struct Node* left;
    struct Node* right;

    int data;
    Node* left;
    Node* right
    };
    What is difference between both of these

    • @kumarivandana1554
      @kumarivandana1554 3 ปีที่แล้ว

      Same question

    • @ankishkhandelwal7588
      @ankishkhandelwal7588 3 ปีที่แล้ว

      @@kumarivandana1554 Hey finally found there is no btw them ??

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

      The only difference is you have nt mentioned the ptr data type which is struc in the second case.

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

      the only difference is if(condition){
      //single action
      }
      vs
      if(condition) /*single action*/ ;
      in short , no significant difference

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

      both are same its just we have already defined data left right using struct so we're omiting it afterwards
      hope it helped

  • @sakil3211
    @sakil3211 3 ปีที่แล้ว +10

    Will using class instead of struct make any difference?

    • @aayushanand8285
      @aayushanand8285 3 ปีที่แล้ว +9

      no. use a class or a struct, it never matters, except for the default accessibility in a struct is public and in a class is private. But as long as you are explicit in what level of accessibility you're using for your members, it doesn't matter whether a class or a struct is used.

    • @hakuna_matata2108
      @hakuna_matata2108 3 ปีที่แล้ว

      its doesnt matter . since class is OOPS so its preffered mostly

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

    In the fourth property, N means the number of nodes that have exactly two child nodes. There is a property that says L = N + 1.

    • @mohannayak4483
      @mohannayak4483 3 ปีที่แล้ว

      thanks man for this, was getting confused

    • @mohannayak4483
      @mohannayak4483 3 ปีที่แล้ว

      But you have missed an extra condition that the binary tree should consist either 0 or 2 nodes only

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

    Why we use binary tree??

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

    oo shit m phlyy e bht miss kr diya or ab 25 koo phr shadi hahahah

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

    Do we need to know application of data structures

  • @th-shubham
    @th-shubham 2 ปีที่แล้ว

    ohhh shrdha di aa gayi

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

    A binary tree with L leaves has at least log2(N+1) +1 number of level ,ig N would be L

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

    Tq didi

  • @singhsahab9478
    @singhsahab9478 3 ปีที่แล้ว

    microsoft bali deede OP

  • @vaibhavsharma4500
    @vaibhavsharma4500 3 ปีที่แล้ว

    Thank you🙏🙏

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

    PLZZ provide notes 🙏🙏

  • @AlokSingh-jw8fr
    @AlokSingh-jw8fr 3 ปีที่แล้ว

    I am a first-year student so I don't have much idea I am studying trees for the first time so I just want to ask why ma'am has not taught trees first before starting with binary trees? Is the tree not of any use?
    I understood the whole video but I had this thing in my mind.

  • @seemapatel06
    @seemapatel06 3 ปีที่แล้ว

    Music is nice ✌️

  • @dhoniandviratfanclub3797
    @dhoniandviratfanclub3797 3 ปีที่แล้ว

    Thanks

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

    Shraddha mam.....

  • @sans.creates
    @sans.creates 3 ปีที่แล้ว +2

    Ye Microsoft wali didi ne padhaya hai na?

  • @Rimanshu_Khatri
    @Rimanshu_Khatri 9 หลายเดือนก่อน

    what if more than 3 levels are present in the binary tree

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

    leave that BGM playing throughout the video, on really low volume, it makes it much more engaging...
    just do try it out...

  • @LuciferMorningStar-t5m
    @LuciferMorningStar-t5m 7 หลายเดือนก่อน

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

    If a tree has l leaves ? then how many levels in terms of L ?? 6:47

    • @pranshu_awasthi
      @pranshu_awasthi 3 ปีที่แล้ว

      Rectification : There should be L in place of N

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

    why we using struct here previous we use class can we do same with the help of class

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

    why use struct in a c++ video, one must try to use class as much as possible to get familiar with oops properties.

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

      not much difference bro

    • @Shourya_performs
      @Shourya_performs 3 ปีที่แล้ว

      @@aayushanand8285 bhai can you provide the code using class

    • @aayushanand8285
      @aayushanand8285 3 ปีที่แล้ว

      @@Shourya_performs just replace the struct keyword with class keyword....and write everything as public....thats it

    • @Shourya_performs
      @Shourya_performs 3 ปีที่แล้ว

      @@aayushanand8285 wht abt the struct pointer that is being used inside the structure..
      Actually I don't use c++ much.. That's why I am facing these issues

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

      @@Shourya_performs you only would require the class/ structure name ...no struct keyword required in c++

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

    you see any error in the 4th property?

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

      yes, for x leaves, minimum no. of levels L = Log(x) + 1, Log having base as 2.

  • @frankysaxena8010
    @frankysaxena8010 3 ปีที่แล้ว

    Sir many lecture don't have notes linked with it

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

    Why initialise right and left as Null?

    • @Rimanshu_Khatri
      @Rimanshu_Khatri 9 หลายเดือนก่อน

      because at that time we are only creating a single node but with two pointer so null is given to complete the node structure

  • @jhashivam28
    @jhashivam28 3 ปีที่แล้ว

    Plz topic wise playlist banado bhaiya

  • @deepanshukumar7290
    @deepanshukumar7290 3 ปีที่แล้ว

    class se kyu nhi kiyaa

  • @AmitYadav-kr6vf
    @AmitYadav-kr6vf 3 ปีที่แล้ว

    Why notes of tree is not uploaded.please anyone reply.and if it is uploaded then where.

  • @sleepypanda7172
    @sleepypanda7172 3 ปีที่แล้ว

    I'm here to understand binary tree because in codechef long challenge may there are 3 questions of trees and I really want to do at least one of them

    • @rxcreativity8441
      @rxcreativity8441 3 ปีที่แล้ว

      Hiii,I am Biswaranjan from BBSR
      your comment told my Heart word.
      Today I am here for same purpose...

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

      @@rxcreativity8441 😂 later I realised that those questions are not of binary tree :( as there are more than two child in those questions

    • @rxcreativity8441
      @rxcreativity8441 3 ปีที่แล้ว

      Then what to do, I mean any data structure available or any method or use 🧠 to solve... 😂😂Bro any idea 💡 to solve🙄 which is HELPFUL

    • @rxcreativity8441
      @rxcreativity8441 3 ปีที่แล้ว

      @@sleepypanda7172 ISS ko sove kiaa?🙄 My only partially AC...

    • @sleepypanda7172
      @sleepypanda7172 3 ปีที่แล้ว

      @@rxcreativity8441 with ISS,same problem

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

    This is wrong therr is a difference between height and level

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

    *Property 4 is incorrect please correct it.

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

    kindly upload the notes pls

  • @Rituraj-zy9jr
    @Rituraj-zy9jr 2 ปีที่แล้ว

    Didi please share the notes of the lecture

  • @gauravkumar3036
    @gauravkumar3036 3 ปีที่แล้ว

    Notes pls

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

    how to find the notes of this lecture ?

  • @khushsharma6470
    @khushsharma6470 3 ปีที่แล้ว

    guys kisine abhi tak sari class liya hai toh tell me how good this course is pllssss

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

      Yeh course bhi acha hai
      Yeh log video late dalte hai aur topic ko jldi finish krte hai .
      CodewithHarry se bhi pdh skte ho

    • @khushsharma6470
      @khushsharma6470 3 ปีที่แล้ว

      @@bitethebyte thanks bro

    • @rahultripathi591
      @rahultripathi591 3 ปีที่แล้ว

      @@bitethebyte bro do you know can I have notes of these lectures. because I have observed some notes are missing from the description?? if anyone has idea please let me know.

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

    Do anyone know we're will i find notes

  • @ayush_b_59
    @ayush_b_59 3 ปีที่แล้ว

    Sir full stack developer course ka link dijiye na please🙏🙏🙏🙏🙏

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

    are you speaking?

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

    Notes nhi h sur please upload

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

    Avl tree link

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

    Shraddhha didi is best

  • @parthmahatungade1210
    @parthmahatungade1210 3 ปีที่แล้ว

    How can represent such data in the console?

  • @jj-pg2dk
    @jj-pg2dk 3 ปีที่แล้ว

    Englishhhhhhhhhhhhhhhhhhhh
    Cause gud vdooo

  • @rahul_ji21
    @rahul_ji21 3 ปีที่แล้ว

    What's a struct ???

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

      it can hold different data types they work same as class bas ye data hide nahi karte if u want to use classes instead so you can do that too

    • @rahul_ji21
      @rahul_ji21 3 ปีที่แล้ว

      @@zainulkhan8381 😊 thanks

  • @crazygunner6775
    @crazygunner6775 3 ปีที่แล้ว

    IN NSUT STUDENTS DONT EXIST IN THE HIERARCHY

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

    Is she Shraddha teaching this?

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

    geeksforgeeks ka utha ke chipka diya 🤣🤣

  • @piyushverma8207
    @piyushverma8207 3 ปีที่แล้ว

    Does anyone know what is that struct thing?

    • @WhatTheFuckAmIDoingNow
      @WhatTheFuckAmIDoingNow 3 ปีที่แล้ว

      It's copy paste of class, the only difference is of some properties like encapsulation, inheritance are available only in class but not in structure.

    • @piyushverma8207
      @piyushverma8207 3 ปีที่แล้ว

      @@WhatTheFuckAmIDoingNow I had found out. Thanks

    • @WhatTheFuckAmIDoingNow
      @WhatTheFuckAmIDoingNow 3 ปีที่แล้ว

      @@piyushverma8207 👍👍

    • @gauravupreti9340
      @gauravupreti9340 3 ปีที่แล้ว

      @@WhatTheFuckAmIDoingNow No, all tools of oops, encapsulation, inheritance, data hiding can be performed in struct also. The only diff is that initially all values in class are private and in struct are public.

    • @WhatTheFuckAmIDoingNow
      @WhatTheFuckAmIDoingNow 3 ปีที่แล้ว

      @@gauravupreti9340 manually or by some sintax ??

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

    Ma'am plzz pin the note

  • @properfect5967
    @properfect5967 3 ปีที่แล้ว

    While writing "bits/stdc++.h " header file,my compiler is showing the error

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

      do it in vs code with all extensions installed of MINGW gcc complier

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

    1:00

  • @Dk-dost
    @Dk-dost 2 ปีที่แล้ว

    C language padhaai na

  • @sarthaktyagii7683
    @sarthaktyagii7683 3 ปีที่แล้ว

    commenting for algorithm lol

  • @harpic949
    @harpic949 3 ปีที่แล้ว

    Ma panner khaunga

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

    Thanks

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

    1:00