Tree Data Structure using Python

Поділитися
Вставка
  • Опубліковано 1 жов 2024
  • This video is about the implementation of Tree data structure using Python from scratch.
    Tree Implementation using Python:
    • Tree Data Structure us...
    • Tree Data Structure us...
    • Binary Search Tree : I...
    • Inorder Traversal | Ha...
    • Preorder Traversal | H...
    • Postorder Traversal | ...
    For 1 : 1 Tutoring
    WhatsApp contact : 7278222619
    mail: jaiswalsatya93@gmail.com
    You can support via UPI : sattujaiswal@okhdfcbank
    Follow us on:
    Whatsapp:
    chat.whatsapp....
    Telegram:
    t.me/joinchat/...
    Facebook:
    / codingcart
    Linkedin:
    / satyendra-jaiswal-9035...
    Instagram:
    / codingcart
    #Tree #DataStructure #Python

КОМЕНТАРІ • 108

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

    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)

  • @HarSH-ub2ng
    @HarSH-ub2ng 13 днів тому +2

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

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

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

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

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

    very helpful thanks

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

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

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

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

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

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

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

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

    Finally got a best teacher on u tube

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

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

    U will succeed sir one day

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

      Thanks Bhubhesh for your kind words.

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

    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  10 місяців тому +1

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

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

    Thanks you for this amazing explanation

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

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

  • @saikrishnadamacharla9444
    @saikrishnadamacharla9444 2 роки тому +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

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

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

    Nice sayender

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

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

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

    Superbly Explained bruh!!

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

    thanks alot .its really useful one

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

      Thanks 😊 Do watch the linked list videos too😊

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

    Hello sir.🙌🙌

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

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

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

    Thanks

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

  • @vipuldogra6600
    @vipuldogra6600 10 місяців тому +1

    very well explained. Thank you!

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

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

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

    Awesome 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

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

    Great Video

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

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

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

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

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

    great vid, dude

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

    good job!

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

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

    It is very helpful bro

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

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

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

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

  • @Binary__
    @Binary__ 10 місяців тому +1

    Easy explanation !! 😍

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

    Hardworker!!

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

    Best explained video i have ever seen

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

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

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

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

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

    Superb awesome explanation

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

    Thank you sir.
    This was helpful.

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

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

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

    super tut

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

    fantastic

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

    Thank you

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

      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

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

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

    love you brooo!!

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

    Thank you very much.

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

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

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

      Cool😎 do share with your friends too 🙂

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

    Great explanation ❤️

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

    Output sir

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

    Thankyou so much bro 😁

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

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

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

    Amazing

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

    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  3 роки тому +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 3 роки тому

      @@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  3 роки тому

      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 3 роки тому +1

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

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

    15:55

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

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

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

    Great video

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

    underrated

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

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

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

    too many ads