5.3 Binary Tree Implementation in C Program | Data Structures Tutorials

preview_player
Показать описание

In this lecture, I have implemented binary tree in C/C++. I have written a C program to create a binary tree of integers.

******************************************
See Complete Playlists:

**********************************************

Connect & Contact Me:

#jennyslectures
#datastructures
#binarytree
#ugcnet
#computerscience
Рекомендации по теме
Комментарии
Автор

Recently I attended a interview, mainly they asked about data structure which I learned here from scratch and particularly they asked about Binary search tree And its implementations and I was able to do it only because of you ...I have seen So much comments but never thought I would comment this, I cant put into words how much grateful I am rn, its mainly because of your lectures I got into the company .Thank You so Much.

Hope-pbdx
Автор

I'm an engg student so I have viewed many tutorials and lectures but the amount of effort you put in making a video is just incredible, and the result is a very nicely explained and convincing lecture, really enjoyed the video.
Respect and love.

theungabunga
Автор

3 years ago data structure was really tough for me...but for you mam now im doing good in data structure, , , thank you so you channel is the most important for me in whole thanks a tonne god bless you and your

amitabharoy
Автор

It's really a mind-blowing video for me when my mam taught me I was literally confused and totally collapsed after seeing this I can able to know clearly what is actually happening in every execution of lines of code you have written. The way you are teaching is really activating my mind and making me interested in studying codes further without lacking my interest mam. Thanks a lot for you.

dhanushh
Автор

Ma'am you are such a blessing to the world...I've never been able to understand the tree's concept so clearly, until I watched your videos.

shekhartewari
Автор

The teacher like you needed in our colleges you have a great and deep knowledge 👍👏👏

MohitSharma-ttuk
Автор

Your explanation of recursion calls is like watching a movie. After watching this today, I can say that I saw "recursion in action" for the first time. Until today, I just pretended that I knew recursion. Now I have a better idea of how it happens!

RD-tvdu
Автор

if u need this program code in c then u can use it.
#include<stdio.h>
#include<stdlib.h>
struct BstNode
{
int data;
struct BstNode* left;
struct BstNode* right;
};
struct BstNode* root=NULL;
struct BstNode* insert(struct BstNode* root, int x)
{
struct BstNode* temp=(struct BstNode*)malloc(sizeof(struct BstNode));
temp->data=x;
temp->left=temp->right=NULL;
if(root==NULL)
root=temp;
else if(root->data>=x)
root->left=insert(root->left, x);
else
root->right=insert(root->right, x);
return root;
}
int search(struct BstNode* root, int data)
{
if(root==NULL)
return 0;
else if(root->data == data) {
return 1;}
else if(root->data>=data)
return search(root->left, data);
else
return search(root->right, data);
}

int main()
{
root = insert(root, 15);
root = insert(root, 10);
root = insert(root, 20);
root = insert(root, 05);
root = insert(root, 30);
root = insert(root, 25);

while(1)
{
int n, l, k;
printf("press 1 for continue and press 2 for end ");
scanf("%d", &k);
if(k==1)
{
printf("enter the value for searching \n");
scanf("%d", &n);
if(search(root, n)==1)
printf("found in\n");
else
printf("not found in\n");
}
else
break;
}
}

Itsmeharshgupta
Автор

this series helped me alot im going to complete my data structure from here only, i have reached till here. mam you are just amazing, i have not found a teacher who explains so good like you any where. thanks to you that we got these lectures. thank you so much mam

pranjalnama
Автор

It takes an another life for my college professors to teach the concept of recursion in trees like you. Awesome explanation👏👏

shyamsrinivassportive
Автор

Mam you explain so much in detaill...you must write a book.

shubhamverma-sxre
Автор

It was the most difficult topic. You explained it exquisitely!

PranjalChalak
Автор

I'm shocked to see the number of views on such good content.

MadForCs
Автор

no Matter what happens... ma'am keep teaching us....keep uploading ur videos... your teaching skills are awesome...

vijay_guptaa
Автор

well, i have to say...you have your own style of teaching and its just amazing

raihanshovon
Автор

Im stopping here cause my class is mostly focused in implementing, but I wanna thank you for putting all this knowledge for free on the internet and also praise your ability to teach, I must be in your channel for about an hour and it feels like 10 mins

good luck with what you do, you really helped :)

anDREasgr
Автор

Man, you're such a great teacher, there hasn't been a single video from you which I haven't understood. Keep up the work!

NitinKumar-ytvx
Автор

Man thankyou so much I have seen a lot of lectures but I cannot understand the exact point how we make binary tree and how is it but I see your lecture you clear all point in very easy and less time thankyou so much..

PriyankaGupta-qixp
Автор

I am an engineering student and can't understand how the recursion pattern works in tree.Your videos are very usful to you u post some videos on java's class, interface, methods, attributes topics mam

srinithis
Автор

i've paid course of Abdul sir but I'm confused a little bit but now clear all of that thanks jenny's Lectures channel

NandiOnTheWheels