the perfect teacher... one with perfect pronunciation, perfect ppt, perfect voice, perfect everything, perfect what not??? huh? everything is awesome!!!!
sir, I am a first-year engineering student and have been watching these videos for 3 months and I really understanding the concepts in-depth thank you for such wonderful videos. Sir, I only request you to increase the frequency of videos so we can learn all the concepts cause there is no teacher better than you.
Sir please Complete the Discrete Mathematics playlist as early as you can (Humble request). It is very much usefull to us in terms of concepts and understanding too... So I have also referred this playlist to many of my frnds. Only bcz it's incomplete, they are feeling somewhat inconvenience. (Going to another channel). So please complete it soon sir🙏
Jai ho maharaj 🙏🙏🙏. Just continue the same..upload as many videos of DS and complete this course.. Thanks a ton. Cz of you i learned c language and DS 🙏
Sir I want any of your instructors to teach design and analysis of algorithms this chapter was very important in the aspects of gate as well as in our curriculum currently we have this it is very helpful for us if u teach that subject
How to insert the direct equation as a user input Like i type x^2+5x+2 and the program should be understood the variables and operations (characters) ?
your way of teaching is so detailed yet in short time......excellently taught this concept ...just awesome....
.thankyouuuuu..........
Source code:
#include
#include
struct node{
float co;
int expo;
struct node* link;
};
struct node* insert(struct node* head,float co,int expo)
{
struct node* temp=malloc(sizeof(struct node));
temp->co=co;
temp->expo=expo;
temp->link=NULL;
if(head==NULL || head->expolink=head;
head=temp;
}
else
{
struct node* temp1=head;
while(temp1->link!=NULL && temp1->link->expo>=expo)
{
temp1=temp1->link;
}
temp->link=temp1->link;
temp1->link=temp;
}
return head;
}
struct node* add(struct node* head,struct node* head1)
{
struct node* temp=head;
struct node* temp1=head1;
struct node* head2=NULL;
while(temp!=NULL && temp1!=NULL)
{
if(temp->expo==temp1->expo)
{
head2=insert(head2,temp->co+temp1->co,temp->expo);
temp=temp->link;
temp1=temp1->link;
}
else if(temp->expo>temp1->expo)
{
head2=insert(head2,temp->co,temp->expo);
temp=temp->link;
}
else if(temp1->expo>temp->expo)
{
head2=insert(head2,temp1->co,temp1->expo);
temp1=temp1->link;
}
}
while(temp!=NULL)
{
head2=insert(head2,temp->co,temp->expo);
temp=temp->link;
}
while(temp1!=NULL)
{
head2=insert(head2,temp1->co,temp1->expo);
temp1=temp1->link;
}
return head2;
}
struct node* create(struct node* head)
{
int n,expo;
float co;
printf("Enter the number of terms: ");
scanf("%d",&n);
for(int i=0;ico,ptr->expo);
ptr=ptr->link;
if(ptr!=NULL)
{
printf("+");
}
else
printf("
");
}
}
Thank you bro...
Appreciated 💯🙏
struct node* temp=malloc(sizeof(struct node)); change struct node* temp=(struct node*)malloc(sizeof(struct node));
no need@@abudardamallik1651
Send this code on my email
the perfect teacher... one with perfect pronunciation, perfect ppt, perfect voice, perfect everything, perfect what not??? huh? everything is awesome!!!!
sir, I am a first-year engineering student and have been watching these videos for 3 months and I really understanding the concepts in-depth thank you for such wonderful videos. Sir, I only request you to increase the frequency of videos so we can learn all the concepts cause there is no teacher better than you.
Ice chey ayitha
@@manojkrishna5137 🤣🤣🤣🙌🙌🙌
You better not to study engineering bro
You are not suitable for engineering
Today stacks has been started in my class ,i hope you will upload videos before the mid sem.
Love❤️❤️❤️
Sir this is huge request plzz complete this course ASAP.......🙏🙏🙏
Neso academy is the best channel to learn dsa in youtube
Took me forever to learn from my textbook. But your explanation was something unimaginably easy and clear.
Thank you Sir!
Very Clear Explanation excellent👌🏾👌🏾
I love Neso Academy :)
Thanks for the best explanation
Sir please Complete the Discrete Mathematics playlist as early as you can (Humble request). It is very much usefull to us in terms of concepts and understanding too... So I have also referred this playlist to many of my frnds. Only bcz it's incomplete, they are feeling somewhat inconvenience. (Going to another channel). So please complete it soon sir🙏
What is the use of discrete mathematics for cs student
you are the best lecturer i have seen
thank u so much
thankyou sir ,best explanation
Thanks for the video
This is best video ♥️ thank you sir
Thanks for the video , I'm looking for recursive way to do this ?
Jai ho maharaj 🙏🙏🙏.
Just continue the same..upload as many videos of DS and complete this course..
Thanks a ton. Cz of you i learned c language and DS 🙏
Thanks for your hard work.
Thanks sir from Kanpur 💕💯👌 good explanation of this session in TH-cam
Best video ❤️💯
please upload videos on trees. I am searching everywhere but none of the video quality match yours and i understand your explanation well
me too
Uploaded on website.
@@rajeshprajapati6662 on which web
Sir make sure to continue the videos please continue sir🙏🙏🙏🙏🙏🙏
very useful, i love you
Excellent explanation 👌 👏 sir
Why we use insert in addition of two polynomials
Thank you sir😘
Thanks for this video... 😇😇
Explanation was greart
excellent sir
Sir I want any of your instructors to teach design and analysis of algorithms this chapter was very important in the aspects of gate as well as in our curriculum currently we have this it is very helpful for us if u teach that subject
THANK YOU SIR
what is the use of the two while loops used in polyadd function after the first while loop ?????
#include
#include
void print(struct node *head3);
struct node
{
float coeff;
int expo;
struct node *next;
};
struct node *insert(struct node *head,float co,int ex)
{
struct node *temp;
struct node *newp=(struct node *)malloc(sizeof(struct node));
newp->coeff=co;
newp->expo=ex;
newp->next=NULL;
if(head==NULL || ex>head->expo)
{
newp->next=head;
head=newp;
}
else
{
temp=head;
while(temp->next!=NULL && temp->next->expo>=ex)
{
temp=temp->next;
}
newp->next=temp->next;
temp->next=newp;
}
return head;
}
struct node *create(struct node *head)
{
int n,i,ex;
float co;
printf("please enter the number of nodes :\t--==> ");
scanf("%d",&n);
for(i=0;iexpo==ptr2->expo)
{
head3=insert(head3,ptr1->coeff+ptr2->coeff,ptr1->expo);
ptr1=ptr1->next;
ptr2=ptr2->next;
}
else if(ptr1->expo>ptr2->expo)
{
head3=insert(head3,ptr1->coeff,ptr1->expo);
ptr1=ptr1->next;
}
else if(ptr2->expo>ptr1->expo)
{
head3=insert(head3,ptr2->coeff,ptr2->expo);
ptr2=ptr2->next;
}
}
while(ptr1!=NULL)
{
head3=insert(head3,ptr1->coeff,ptr1->expo);
ptr1=ptr1->next;
}
while(ptr2!=NULL)
{
head3=insert(head3,ptr2->coeff,ptr2->expo);
ptr2=ptr2->next;
}
printf("
ADDED POLYNOMIALS IS
");
print(head3);
}
void print(struct node *head3)
{
struct node * temp=head3;
if(head3=NULL)
printf("no polynomials");
while(temp!=NULL)
{
printf("(%.1f)^%d",temp->coeff,temp->expo);
temp=temp->next;
if(temp!=NULL)
{
printf("+");
}
else
printf("
");
}
}
int main()
{
struct node *head1 = NULL;
struct node *head2 = NULL;
;
printf("POLYNOMIAL 1
");
head1=create(head1);
printf("
POLYNOMIAL 2
");
head2=create(head2);
polyadd(head1,head2);
return 0;
}
thanks bro
thanks bruh....but in 3rrd line no need to declare like that...instead u can give void print().
code is working fine but the output is not crt
can u check it and resend the code
@@subashkannan949 yes same issue
@@prajapatishyamdineshkumar4456 output haven,t give the sum in this..
How to insert the direct equation as a user input
Like i type x^2+5x+2 and the program should be understood the variables and operations (characters) ?
Merge sort adapted for Linked lists.
Thanks for the video sir...
sir its humble request to make videos on tree and graphs pls pls sir
it could be better if I could get the code and copy it.
Good work
Thankyou sir💚💚
Great explanation sir
can u pls provide the same in java, sir?
sir resultant liked list not in sorted form please explain
Where can i get this code
can anyone pls send the link for previous lecture for insert and print function as you said in this video
exponet means what
Bro could you provide the source code ?
sir could you please comment the code in comment section
Plz give code link
To execute my self
Source code plz sir
Bhai code bhi de diya kar
Sir Your Video is coming very late Sir please upload ASAP
#include
#include
struct polynode
{
float coeff;
int expo;
struct polynode *link;
};
struct polynode *insert(struct polynode* head,float co,int ex)
{
struct polynode *temp;
struct polynode* newp=malloc(sizeof(struct polynode));
newp->coeff=co;
newp->expo=ex;
newp->link=NULL;
//If there is no node in the list or given exponent is greater than first node exponent
if((head==NULL)|| ex>head->expo)
{
newp->link=head;
head=newp;
}
else
{
temp=head;
while(temp->link != NULL && temp->link->expo>=ex)
{
temp=temp->link;
}
newp->link=temp->link;
temp->link=newp;
}
return(head);
}
struct polynode* create(struct polynode *head)
{
int n,i;
float coeff;
int expo;
printf("Enter the number of terms
");
scanf("%d",&n);
for(i=0;icoeff,temp->expo);
temp=temp->link;
if(temp!=NULL)
{
printf(" + ");
}
else
{
printf("
");
}
}
}
}
void polyAdd(struct polynode* head1,struct polynode* head2)
{
struct polynode* ptr1=head1;
struct polynode* ptr2=head2;
struct polynode* head3=NULL;
while(ptr1!=NULL && ptr2!=NULL)
{
if(ptr1->expo == ptr2->expo)
{
head3=insert(head3,ptr1->coeff+ptr2->coeff,ptr1->expo);
ptr1=ptr1->link;
ptr2=ptr2->link;
}
else if(ptr1->expo>ptr2->expo)
{
head3=insert(head3,ptr1->coeff,ptr1->expo);
ptr1=ptr1->link;
}
else if(ptr1->expoexpo)
{
head3=insert(head3,ptr2->coeff,ptr2->expo);
ptr2=ptr2->link;
}
}
while(ptr1!=NULL)
{
head3=insert(head3,ptr1->coeff,ptr1->expo);
ptr1=ptr1->link;
}
while(ptr2!=NULL)
{
head3=insert(head3,ptr2->coeff,ptr2->expo);
ptr2=ptr2->link;
}
printf("Added polynomial is:");
print(head3);
}
int main()
{
struct polynode* head1=NULL;
struct polynode* head2=NULL;
printf("Enter the first polynomial:
");
head1=create(head1);
printf("Enter the second polynomial:
");
head2=create(head2);
polyAdd(head1,head2);
return 0;
}
I am getting wrong output when I run this code
Can anyone help me with this please
Thanks a lot
dude can anyone just give me this code...it's a request @Neso please share the code in the description
#include
#include
struct node
{
float coeff;
int expo;
struct node *next;
};
struct node *insert(struct node *head, float co, int ex)
{
struct node *temp;
//Creating a new node
struct node *newp = malloc(sizeof(struct node));
newp->coeff = co;
newp->expo = ex;
newp->next = NULL;
if (head == NULL || ex > head->expo)
{
newp->next = head;
head = newp;
}
else
{
temp = head;
while (temp->next != NULL && temp->next->expo > ex)
{
temp = temp->next;
}
newp->next = temp->next;
temp->next = newp;
}
return head;
}
struct node *create(struct node *head)
{
int n, i, expo;
float coeff;
printf("Enter the no of terms");
scanf("%d", &n);
for (i = 0; i < n; i++)
{
printf("Enter the coeff of the term %d:", i + 1);
scanf("%f", &coeff);
printf("Enter the expo of the term %d:", i + 1);
scanf("%d", &expo);
head = insert(head, coeff, expo);
}
return head;
}
void print(struct node *head)
{
if (head == NULL)
{
printf("No polynomial");
}
else
{
struct node *temp = head; //Assigning head to temp pointer
while (temp != NULL)
{
printf("(%.2fx^%d)", temp->coeff, temp->expo);
temp = temp->next;
if (temp != NULL)
{
printf(" + ");
}
else
{
printf("
");
}
}
}
}
struct node *poly_add(struct node *head1, struct node *head2)
{
struct node *ptr1 = head1;
struct node *ptr2 = head2;
struct node *head3 = NULL;
while (ptr1 != NULL && ptr2 != NULL)
{
if (ptr1->expo == ptr2->expo)
{
head3 = insert(head3, ptr1->coeff + ptr2->coeff, ptr1->expo);
ptr1 = ptr1->next;
ptr2 = ptr2->next;
}
else if (ptr1->expo > ptr2->expo)
{
head3 = insert(head3, ptr1->coeff, ptr1->expo);
ptr1 = ptr1->next;
}
else if (ptr1->expo < ptr2->expo)
{
head3 = insert(head3, ptr2->coeff, ptr2->expo);
ptr2 = ptr2->next;
}
}
while (ptr1 != NULL)
{
head3 = insert(head3, ptr1->coeff, ptr1->expo);
ptr1 = ptr1->next;
}
while (ptr2 != NULL)
{
head3 = insert(head3, ptr2->coeff, ptr2->expo);
ptr2 = ptr2->next;
}
printf("The added polynomial is :
");
print(head3);
}
int main()
{
struct node *head1 = NULL;
struct node *head2 = NULL;
printf("Enter the first polynomial :
");
head1 = create(head1);
printf("
");
printf("Enter the second polynomial :
");
head2 = create(head2);
printf("
");
poly_add(head1, head2);
return 0;
}
@@debrajdey9060 Thanks
SOURCE CODE
#include
#include
struct node
{
float coeff;
int expo;
struct node *next;
};
struct node* insert(struct node* head,float co,int ex)
{
struct node *temp;
struct node* newP = malloc(sizeof(struct node));
newP->coeff = co;
newP->expo = ex;
newP->next = NULL;
if(head==NULL || ex > head->expo)
{
newP->next = head;
head = newP;
}
else
{
temp=head;
while(temp->next != NULL && temp->next->expo >= ex)
temp=temp->next;
newP->next = temp->next;
temp->next = newP;
}
return head;
}
struct node* create(struct node* head)
{
int n,i;
float coeff;
int expo;
printf("please enter the number of nodes :\t--==> ");
scanf("%d",&n);
for(i=0; icoeff, temp->expo);
temp = temp->next;
if(temp!=NULL)
printf(" + ");
else
printf("
");
}
}
}
void polyadd(struct node* head1,struct node* head2)
{
struct node* ptr1 = head1;
struct node* ptr2 = head2;
struct node* head3 = NULL;
while(ptr1 != NULL && ptr2 != NULL)
{
if(ptr1->expo == ptr2->expo)
{
head3 = insert(head3, ptr1->coeff+ptr2->coeff, ptr1->expo);
ptr1 = ptr1->next;
ptr2 = ptr2->next;
}
else if(ptr1->expo > ptr2->expo)
{
head3 = insert(head3, ptr1->coeff, ptr1->expo);
ptr1 = ptr1->next;
}
else if(ptr1->expo < ptr1->expo)
{
head3=insert(head3,ptr2->coeff,ptr2->expo);
ptr2=ptr2->next;
}
}
while(ptr1!=NULL)
{
head3 = insert(head3, ptr1->coeff, ptr1->expo);
ptr1 = ptr1->next;
}
while(ptr2!=NULL)
{
head3 = insert(head3, ptr2->coeff, ptr2->expo);
ptr2 = ptr2->next;
}
printf("
ADDED POLYNOMIALS IS
");
print(head3);
}
int main()
{
struct node* head1 = NULL;
struct node* head2 = NULL;
printf("POLYNOMIAL 1
");
head1 = create(head1);
printf("
POLYNOMIAL 2
");
head2 = create(head2);
polyadd(head1, head2);
return 0;
}
Hi
Can you give us the java one pls?
Sir Your Video is coming very late Sir please upload ASAP