Code to Create a Linked LIst in C programming video. Very detail code with an easy explanation. Video Link for theory :- • Code to create a Linke... Github Link :- github.com/viv...
i nearly wasted half-day by listening other lecture videos(linked list) and learned nothing ,confused alot, but after listening to your lecture i got full clarity on linked list.thank you sir
Very easy explanation for absolute beginners. I wasted my whole day learning linked list from others videos but learned nothing and got confused. You clarified everything so easily . Thank you sir.
sir i am from Pakistan this video lecture helps me a lot in data structure so it is humbly requested to give such type of lecture on each data structure instead of only explaining algorithm codes explanation helps the students a lot. thank you sir for this lecture and uploading its program.
Can you turn this into a series? Maybe you could do doubly linked list next and move onto more and more complex data structures you cover in the other videos
I think i finished your algorithm for merge sort linked list but i am not sure is it correct , it seems to be correct but i didnt test it correctly (You have find middle function - second head , and merge sorted linked list to form new sorted linked list I wrote splitBefore function because you had found second head In merge functon i set prev pointers and pointer tail node and i wrote recursive sorting function) I have also partition sort linked list but I think that code can be simplified I have tree sort linked list , worst case can be eliminated using red black tree or AVL tree Our linked list will be general if we use void* as data type, use variable number of function arguments, and pass function as parameter to other function fe for comparison
ideone.com/srAlNc Linked List by Robert Lafore Merge Sort I (have) finished algorithm that Vivekanand Khyade described Partition Sort I decomposed it into parts and wrote each part Goodrich & Tamassia slides was helpful for partition step BST Sort I have found necessary functions on the internet Exercises for you Try to implement non recursive merge sort - natural merge sort is an option This Partition sort uses Lomuto partition which is applicable to both singly linked list and doubly linked list Try to write Partition sort with Hoare partition Time complexity for worst case of this BST sort is O(n^2) Try to improve worst case by using self-balancing BST
Write a c program to construct a linear link list in c to store student records .The record contains roll no and total Mark's. The program stops when a negative roll no is entered . How to do this pls hlp.
The p=head is used so that p point at the start of the list since we need to print list from start. Before that the p was not in the start. Hope that helps.
Sir, can you write the same linked list program to get the output as Banana->orange->pineapple->mango->apple, as the output...when I try to do the same with the above strings I am getting segmentation error...please sir upload such program...it will be a great help
its directive operator -> ka matlab aap Pointers use kar rahe aur kisi cheez ki taraf Point kar rahe hein , Pointer use karte waqt is tarah access kiya jata he
#include #include struct node{ int data; struct node *next; }; int main(void) { struct node *p,*temp,*head; int n; scanf("%d",&n); int element,i; scanf("%d",&element); temp=(struct node *)malloc(sizeof(struct node)); temp->data=element; temp->next=NULL; head=temp; p=head; for(i=1;idata=element; temp->next=NULL; p->next=temp; p=p->next; } p=head; while(p!=NULL) printf("%d",p->data); return 0; } the same code u taught but i am getting infinite values i give could u help me to debug it
Hey you have missed to create a node in forloop before allocating the element to the temp; Temp already pointing to first node and same node is altered. and at the end, you haven't iterated the link of your node in while() its stucked at first node only.
#include #include struct node{ int data; struct node *next; }; int main(void) { struct node *p,*temp,*head; int n; scanf("%d",&n); int element,i; scanf("%d",&element); temp=(struct node *)malloc(sizeof(struct node)); temp->data=element; temp->next=NULL; head=temp; p=head; for(i=1;idata=element; temp->next=NULL; p->next=temp; p=p->next; } p=head; while(p!=NULL){ printf("%d\t",p->data); p = p->next; } return 0; } Compare this with your program if you got confused
i nearly wasted half-day by listening other lecture videos(linked list) and learned nothing ,confused alot, but after listening to your lecture i got full clarity on linked list.thank you sir
Same here , I wasted 2 days 😅
but i wasted 10 days
Very easy explanation for absolute beginners. I wasted my whole day learning linked list from others videos but learned nothing and got confused. You clarified everything so easily . Thank you sir.
Thanks Labani for appreciating
Informative. Instead of assuming we know all the basics, you explained functions of each code NICEEE! Keep up the good work.
Ab jakr koi video mili jism linked list k hr point ko describe krk btaya ....thank you so much sir
sir i am from Pakistan this video lecture helps me a lot in data structure so it is humbly requested to give such type of lecture on each data structure instead of only explaining algorithm codes explanation helps the students a lot.
thank you sir for this lecture and uploading its program.
Sir,you are truly mind-blowing
Earlier I used to see mycodeschool videos but they have stopped uploading a long time ago... You are a the best sir
The founder of mycodeschool is no more in the world :( He met with an accident. Hence no videos.
@@patil88ganesh how did u find that out??
Can you turn this into a series? Maybe you could do doubly linked list next and move onto more and more complex data structures you cover in the other videos
very good teaching sir no one can explain this topic in the youtube
Nice and relaxed, easy does it teaching. As good as it gets, many thanks!
Clear explanation with good information tq 👍 sir .......
Sir plz do the coding for all topics in data structures
great explanation sir....thank u very much💯
I think i finished your algorithm for merge sort linked list but i am not sure is it correct , it seems to be correct but i didnt test it correctly
(You have find middle function - second head , and merge sorted linked list to form new sorted linked list
I wrote splitBefore function because you had found second head In merge functon i set prev pointers and pointer tail node
and i wrote recursive sorting function)
I have also partition sort linked list but I think that code can be simplified
I have tree sort linked list , worst case can be eliminated using red black tree or AVL tree
Our linked list will be general if we use void* as data type, use variable number of function arguments, and pass function as parameter to other function fe for comparison
ideone.com/srAlNc
Linked List by Robert Lafore
Merge Sort I (have) finished algorithm that Vivekanand Khyade described
Partition Sort I decomposed it into parts and wrote each part Goodrich & Tamassia slides was helpful for partition step
BST Sort I have found necessary functions on the internet
Exercises for you
Try to implement non recursive merge sort - natural merge sort is an option
This Partition sort uses Lomuto partition which is applicable to both singly linked list and doubly linked list
Try to write Partition sort with Hoare partition
Time complexity for worst case of this BST sort is O(n^2) Try to improve worst case by using self-balancing BST
Very easy explained. My doubts are cleared. Thank u sir
simple and clear!!!
Excellent video! Just one question, I don't fully understand why p = head after for loop. Anybody can help?
Becoz we have to print values of data from starting , but before declarating p=head , p was pointing the null of q so that's why..
Thank u sir for such a wonderful video
this format is quite good sir. keep it up
Spr sir ❤️ explanation is really awesome 😍
yar what is this ..size of link list is fixed in your video....is it the link list???
Love your videos. Can you create a video on Hash table and hash code?
Very well explanation!
Sir,plzz upload graph coloring using backtracking
Very good
Hello sir please explain flattening of linked list question if you find time
Thankyou very much sirrr..🙏
Write a c program to construct a linear link list in c to store student records .The record contains roll no and total Mark's. The program stops when a negative roll no is entered . How to do this pls hlp.
Outstanding explanation ❤❤❤
hi!
if i want to add defence programming (a>0 && a
Hello Sir, can you please do hasse diagram.
U r always awesome ,plz keep uploading sir
Very nice Sir
❌ sizeof() is an operator not a function
Excellent video.
best for linked list !
Sir code gulo aktu vs code e run koriye dekiye din
After for loop completes, why we have to write p=head in the code
The p=head is used so that p point at the start of the list since we need to print list from start.
Before that the p was not in the start. Hope that helps.
❤️
Thank You
I got Segmentation 11 when I run the program.
Sir, can you write the same linked list program to get the output as Banana->orange->pineapple->mango->apple, as the output...when I try to do the same with the above strings I am getting segmentation error...please sir upload such program...it will be a great help
please tell what is the name of the compiler
Dev c++
Kindly find and back opertion implement if any one ve then share link plzz
bloody damn explanation
These teachers are in university,not those rude teachers
Thank you so much Sir
hi sir.
Sir -> ka meaning kya hota hai??
its directive operator -> ka matlab aap Pointers use kar rahe aur kisi cheez ki taraf Point kar rahe hein ,
Pointer use karte waqt is tarah access kiya jata he
@@yhz2K - minus hai kya
hindi me kyu nhi explaination karta koi?
G 33
👍👍👍👍👍🫡🫡🫡
#include
#include
struct node{
int data;
struct node *next;
};
int main(void) {
struct node *p,*temp,*head;
int n;
scanf("%d",&n);
int element,i;
scanf("%d",&element);
temp=(struct node *)malloc(sizeof(struct node));
temp->data=element;
temp->next=NULL;
head=temp;
p=head;
for(i=1;idata=element;
temp->next=NULL;
p->next=temp;
p=p->next;
}
p=head;
while(p!=NULL)
printf("%d",p->data);
return 0;
}
the same code u taught but i am getting infinite values i give could u help me to debug it
Hey you have missed to create a node in forloop before allocating the element to the temp;
Temp already pointing to first node and same node is altered.
and at the end, you haven't iterated the link of your node in while() its stucked at first node only.
#include
#include
struct node{
int data;
struct node *next;
};
int main(void) {
struct node *p,*temp,*head;
int n;
scanf("%d",&n);
int element,i;
scanf("%d",&element);
temp=(struct node *)malloc(sizeof(struct node));
temp->data=element;
temp->next=NULL;
head=temp;
p=head;
for(i=1;idata=element;
temp->next=NULL;
p->next=temp;
p=p->next;
}
p=head;
while(p!=NULL){
printf("%d\t",p->data);
p = p->next;
}
return 0;
}
Compare this with your program if you got confused
Dry run your program on paper step by step first. you will get to know. if not refer below.TRY FIRST IN ORDER TO UNDERSTAND WHAT YOU ARE DOING.
mura kag amaw buanga ka