P5 BinaryTree
P5 BinaryTree
: 07
Kunal Shantaram Bhoi
(2022600007)
CSE (AIML)
Batch : A
--------------------------------------------------------------------------------
Problem Statement :
Insertion (AVL Tree)
--------------------------------------------------------------------------------
Program :
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node* left;
struct Node* right;
int height;
};
x->right = y;
y->left = T2;
return x;
}
y->left = x;
x->right = T2;
return y;
}
if (node == NULL)
return newNode(data);
int main() {
struct Node* root = NULL;
int n, data;
return 0;
}
-------------------------------------------------------------------------------------
Output :