L2.2 Representation of Binary Tree | Pointers | Binary Tree | Data Structures & Algorithms

Publié le: 09 novembre 2022
sur la chaîne: SYSTEMwithEase
107
9

00:00 Representation of Binary Tree
00:37 Class Representation in JAVA
02:05 Representing above tree using Nodes

class Node {
int key;
Node left, right;

// constructor
Node(int key)
{
this.key = key;
this.left = null;
this.right = null;
}
}

Above Binary Tree representation
Node root = new Node(1);
root.left = new Node(2);
root.right = new Node(4);
root.left .left = new Node(3);
root.left.right = null; //No need to assign null its by default null
root.right .left = new Node(7);
root.right .right = new Node(7);


----------------------------------------------------------------------------------------------------------------------------------------------------Playlists

Data Structure & Algorithm | Binary Tree :    • Data Structure & Algorithm | Binary Tree  

Data Structure & Algorithm | Array :    • Data Structure & Algorithm | Array  

Data Structure & Algorithm | Heap :    • Data Structure & Algorithm | Heap  
---------------------------------------------------------------------------------------------------------------------------------------------------- Watch video in 1.25x for better experience..

Please do like, comment, subscribe and share :)

#dsa #binarytree #algorithm #interview #placements #productbased #java #pointers

Mentor : Vijay Dhakad
LinkedIn -   / vijay-dhakad-476377169  
Instagram -   / dhakad_vj  
Facebook -   / vijay.dhakad.7773  


Sur cette page du site, vous pouvez voir la vidéo en ligne L2.2 Representation of Binary Tree | Pointers | Binary Tree | Data Structures & Algorithms durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SYSTEMwithEase 09 novembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 107 fois et il a aimé 9 téléspectateurs. Bon visionnage!