Tree Data Structure using Python

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

КОМЕНТАРІ • 110

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

    I have explained the whole code in 2nd lecture. If anyone is facing issue in this 1st lecture code please use the below code, add return statement when the node is None.
    if node is None:
    return self.createNode(data)

  • @malyalasaiphaneendra6172
    @malyalasaiphaneendra6172 Рік тому +7

    I'm a beginner and trying hard to solve a leetcode problem regarding trees. But I don't have idea how a tree is constructed. Your explanation gave me complete structure of tree..... Thanks a lot for step by step explanation

    • @codingcart
      @codingcart  Рік тому +3

      Glad it helped😊. Please do share with your friends too😊

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

    Finally got a best teacher on u tube

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

    just no words...I was struggling to create tree from past 2 days... And today, I got understood by your explanation. Thank you brother

  • @mishuksarker213
    @mishuksarker213 4 роки тому +6

    I hope this is very easy to understanding tree data structure .Thanks a lot...........

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

    THIS VIDEO IS SOOOOOOO GOOOD!!!!!!! this solved my problems that couldnt be solved from other yt videos, thankss

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

    I don't generally comment, but you're really amazing!
    Thankyou for clearing my concepts.
    Love to see more videos on DSA Python.

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

    I am watching from USA. Dada you explain very well. I went on other youtube channel, but didn't understand and came back to you

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

      Glad it helped😊. Please do share with your friends too😊

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

    The most detailed explanation available online, for a tree implementation.

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

      Cool😎 do share with your friends too 🙂

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

    Hi this is the best explanation on BST, thanks for this video

  • @vikash.official
    @vikash.official 4 роки тому +7

    Like the way how you teach👌🏻

  • @HarSH-ub2ng
    @HarSH-ub2ng 2 місяці тому +2

    If you didn't get it in first time, watch it again
    I got to know this information after wasting my 1 week 😢

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

    Loved it broo👍 ....I ll keep watching you videos😁

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

    Thanks, this is one of the best video to learn about tree creation using Python...

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

    Superbly Explained bruh!!

  • @HimanshuSingh-gs5fg
    @HimanshuSingh-gs5fg 4 роки тому +3

    Thanks, bro... your explanation is best for beginners in data structure like me

  • @paruluniyal2305
    @paruluniyal2305 4 роки тому +6

    Great job 👏👍👏

  • @user-vt7kt6ny3o
    @user-vt7kt6ny3o Рік тому +2

    very helpful thanks

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

      Glad it helped😊. Please do share with your friends too😊

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

    Easy explanation !! 😍

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

    Best explanation ever!!
    Thank you so much Sir for enlightening us 🙌❤️

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

      Marvelous Explanation Sir.
      Just a humble request.
      I want to excel in card games such as- Bluff, Court piece, etc.
      Please post a tutorial on its algorithm. It'll be both fun & informative.
      Thanks.

  • @MEHEDIHASSAN-lx5rx
    @MEHEDIHASSAN-lx5rx 7 місяців тому +1

    Best explained video i have ever seen

  • @bhubeshsr6281
    @bhubeshsr6281 4 роки тому +5

    U will succeed sir one day

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

      Thanks Bhubhesh for your kind words.

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

    Awesome explanation 👌

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

    very well explained. Thank you!

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

      Glad it helped😊. Please do share with your friends too😊

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

    Hardworker!!

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

    Superb awesome explanation

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

    very easy to follow. Thank you so much for making this video. Best wish to you.

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

      Glad to hear that 🤗. Please share with your friends too 🙂

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

    Great Video

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

    It is very helpful bro

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

      Glad to hear that😊
      Please do share with your friends too 😉

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

    thanks alot .its really useful one

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

      Thanks 😊 Do watch the linked list videos too😊

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

    Thank you sir.
    This was helpful.

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

      Glad you liked it 😊. Do share with your friends too 🙂

  • @ashwinkrishnan1287
    @ashwinkrishnan1287 9 місяців тому +1

    Thanks you for this amazing explanation

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

      Glad it helped😊. Please do share with your friends too😊

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

    Nice sayender

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

    super tut

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

    Why is there a separate Node class when the Tree class doesn't even have a constructor?

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

    great vid, dude

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

    good job!

  • @sahalibrahim3044
    @sahalibrahim3044 17 днів тому +1

    very good video sir. i love you

    • @codingcart
      @codingcart  17 днів тому

      Glad it helped😊. Please do share with your friends too😊

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

    Great explanation ❤️

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

    thank you so much brother

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

      Glad you liked it 😊. Do share with your friends too 🙂

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

    Teacher, could you teach us with a N-ary tree? Please

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

    love you brooo!!

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

    Thankyou so much bro 😁

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

      Glad it helped😊. Please do share with your friends too😊

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

    Thank you very much.

  • @faris.abuali
    @faris.abuali 2 роки тому +1

    Thanks

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

    Thank you

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

      You can start linked list with simple problem :)
      ua-cam.com/video/CnH48nmU8BI/v-deo.html
      ua-cam.com/video/litQHGRRSdo/v-deo.html
      ua-cam.com/video/71lls_x4VdY/v-deo.html
      ua-cam.com/video/DxvET45WAgE/v-deo.html
      ua-cam.com/video/o-bnjsY2Hck/v-deo.html

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

    You. have not initialised node any where.
    Can u plz explain more about node is None .

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

      It's initialized in the beginning, you can check the Node class constructor.

  • @RiyaBhawsar-b9i
    @RiyaBhawsar-b9i 9 місяців тому

    @codingcart can you please share link of linkedlist and array here, i can not find that.

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

      LinkedList
      ua-cam.com/play/PLPdtS77PaSutcdxM6FfjfbpW8GiBw-QzL.html

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

    Amazing

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

    Hello sir.🙌🙌

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

    is node a variable or instance? node.left is a variable and we are assigning Node(data) to it..howz that possible? Node(data) has 3 variables

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

      It's a instance, please have a look to class Node you will get it. Also visit part 2 of this lecture it will clear your all doubts.😊

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

    Please explain, in line 9 of code what does Node(data) mean???

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

    I didn't understand why "return node" is returning the very first node every time because the node value is changing at every recursion. Someone please help.

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

      Coz the head node should be kept hinged, suppose you are going to iterate through the list and if you don't have the head node then how will you proceed.
      So for going for any operation we have to start with head only. That's why head is kept hinged or safe.😊

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

      @@codingcart Actually I understood why the head node is hinged. My question is how is it hinged since the node value changes in the recursive process.

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

      Each time new node is added to their respective position by going through condition check, head node is not being changed. Just take few inputs and dry run on paper you will get this one.if you still face problem you can ping on whatsapp 😊

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

      @@codingcart Finally got it! Thanks for explaining this topic beautifully!

  • @Death-metal99
    @Death-metal99 11 місяців тому

    underrated

    • @codingcart
      @codingcart  11 місяців тому +1

      Glad it helped😊. Please do share with your friends too😊

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

    15:55

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

    Your code doesnt works

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

      It's the part 1 where I have explained only basic ..checkout the next part you will get it 😊

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

      @@codingcart no its showing it had no attirbute type data

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

      Share your code

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

      @@codingcart class Node:
      def __init__(self,data):
      self.right = None
      self.data = data
      self.left = None
      class Tree:
      def createNode(self,data):
      return Node(data)
      def insert(self,node,data):
      if node is None:
      self.createNode(data)
      if data < node.data:
      node.left = self.insert(node.left,data)
      else:
      node.right = self.insert(node.right,data)
      return node
      t = Tree()
      root = t.createNode(5)
      t.insert(root,10)

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

      @@noobcodersgang3991 i have explained in the next session code. anyway you can add return statement in condition if node is None.
      if node is None:
      return self.createNode(data)

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

    Output sir

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

    too many ads

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

    fantastic

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

    Great video