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

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 142

  • @art3mixfake962
    @art3mixfake962 3 роки тому +78

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

  • @faizanqazi7004
    @faizanqazi7004 3 роки тому +76

    *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

  • @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

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

    Dii aap sab se acha samjhate ho❤️

  • @Inzmamulhaq-ip9yq
    @Inzmamulhaq-ip9yq 2 роки тому

    Ap ka samjna ka andaz Kamal ka a

  • @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.

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

    wow great explain didi

  • @_Deepak__Verma
    @_Deepak__Verma Рік тому +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.

  • @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.

  • @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

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

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

  • @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.

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

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

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

    Thank you Didi 😊🙏💐

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

    This is my favorite data structures

  • @Inzmamulhaq-ip9yq
    @Inzmamulhaq-ip9yq 2 роки тому

    I love you ma'am 💗

  • @HustleKaro24
    @HustleKaro24 3 роки тому +9

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

  • @DawoodRizwan-k7f
    @DawoodRizwan-k7f 8 місяців тому

    so good tech...

  • @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

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

    Thank u didi😄

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

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

  • @th-shubham
    @th-shubham 2 роки тому

    ohhh shrdha di aa gayi

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

    finally binary tree aa gaya

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

    best best content love from pakistan

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

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

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

    How will take input form user in BST

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

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

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

    Tq didi

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

    Thank you🙏🙏

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

    Music is nice ✌️

  • @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 7 місяців тому

      you can use class dude

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

    What is struct?

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

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

  • @AbhishekKumar-on3iy
    @AbhishekKumar-on3iy 3 роки тому +3

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

  • @ArjunArjun-vw5fq
    @ArjunArjun-vw5fq 3 роки тому

    A powerful data structure is coming

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

    Do we need to know application of data structures

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

    Shraddha mam.....

  • @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

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

    PLZZ provide notes 🙏🙏

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

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

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

    Thanks

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

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

  • @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

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

    Why we use binary tree??

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

    Too nice explained!

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

    Wooo
    I like the way which she is explaining

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

    microsoft bali deede OP

  • @LuciferMorningStar-t5m
    @LuciferMorningStar-t5m 10 місяців тому

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

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

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

    1:00

  • @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

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

    Why initialise right and left as Null?

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

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

  • @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.

  • @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

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

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

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

    Plz topic wise playlist banado bhaiya

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

    Do anyone know we're will i find notes

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

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

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

    Sir many lecture don't have notes linked with it

  • @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.

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

    Shraddhha didi is best

  • @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++

  • @AmitYadav-kr6vf
    @AmitYadav-kr6vf 3 роки тому

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

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

    kindly upload the notes pls

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

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

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

    Notes pls

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

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

  • @Rituraj-zy9jr
    @Rituraj-zy9jr 3 роки тому

    Didi please share the notes of the lecture

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

    Notes nhi h sur please upload

  • @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

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

    how to find the notes of this lecture ?

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

    *Property 4 is incorrect please correct it.

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

    Avl tree link

  • @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

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

    How can represent such data in the console?

  • @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...

  • @sans.creates
    @sans.creates 3 роки тому +2

    Ye Microsoft wali didi ne padhaya hai na?

  • @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 ??

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

    are you speaking?

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

    class se kyu nhi kiyaa

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

    This is wrong therr is a difference between height and level

  • @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.

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

    Ma'am plzz pin the note

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

    IN NSUT STUDENTS DONT EXIST IN THE HIERARCHY

  • @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

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

    geeksforgeeks ka utha ke chipka diya 🤣🤣

  • @Dk-dost
    @Dk-dost 3 роки тому

    C language padhaai na

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

    Is she Shraddha teaching this?

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

    commenting for algorithm lol

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

    Ma panner khaunga

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

    Thanks

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

    1:00