Link list was very well explained i really liked it a lot.
@bachalakurisumathi52112 жыл бұрын
sir your teaching is very understanding to students. iam also faculty,i v'l follow ur video. its very usefull to my teaching.
@sondos23-t5c9 ай бұрын
Thank u so much. The explanation is very simple. I hope it will be translated into Arabic🔥 in the future. Continue, u deserve the best 👌🏼
@swapniljaiswal49565 жыл бұрын
I wrote the full program down here: #include #include int value; struct node { int data; struct node *next; }*new,*head,*tail,*temp,*current,*prev,*next; void create() { new=(struct node*)malloc(sizeof(struct node)); printf("Enter the value: "); scanf("%d",&value); new->data=value; new->next=NULL; } void insert() { create(); if(head==NULL) { head=new; tail=new; } else { tail->next=new; tail=new; } display(); } void display() { printf("Updated link list is: "); temp=head; while(temp!=NULL) { printf("%d ",temp->data); temp=temp->next; } } void insertatbeg() { if(head==NULL) printf("No Linked List found."); else { create(); new->data=value; new->next=head; head=new; display(); } } void insertatend() { if(head==NULL) printf("No Linked List found."); else { create(); new->data=value; tail->next=new; new->next=NULL; tail=new; display(); } } void insertatmid() { if(head==NULL) printf("No Linked List found."); else { create(); temp=head; int pos,i; printf("Enter the position where new node is to be inserted: "); scanf("%d",&pos); for(i=0;inext; } new->data=value; new->next=temp->next; temp->next=new; display(); } } void deleteatbeg() { if(head==NULL) printf("No Linked List found."); else { temp=head; head=head->next; temp->next=NULL; display(); } } void deleteatend() { if(head==NULL) printf("No Linked List found."); else temp=head; while(temp->next!=tail) { temp=temp->next; } temp->next=NULL; tail=temp; display(); } void deleteatmid() { if(head==NULL) printf("No Linked List found."); else { temp=head; int pos=0,i; printf("Enter the position which you want to delete. "); scanf("%d",&pos); for(i=0;inext; } temp->next=temp->next->next; display(); } } void count() { if(head==NULL) printf("No Linked List found."); else { int count=0; temp=head; while(temp!=NULL) { count++; temp=temp->next; } printf(" Total number of nodes is : %d ",count); } } void reverse() { if(head==NULL) printf("No Linked List found."); else { current=head; while(current!=NULL) { next=current->next; current->next=prev; prev=current; current=next; } } head=prev; display(); } int main() { printf("Press: 1.Insert a new value. 2.Display all elements. 3.Insert at beginning. 4.Insert at End. 5.Insert in middle. 6.Delete at beginning. 7.Delete at End. 8.Delete in between. 9.Count total number of nodes. 10.Reverse 0.Exit"); int choice; do { printf(" Enter your choice: "); scanf("%d",&choice); switch(choice) { case 1: insert(); break; case 2: display(); break; case 3: insertatbeg(); break; case 4: insertatend(); break; case 5: insertatmid(); break; case 6: deleteatbeg(); break; case 7: deleteatend(); break; case 8: deleteatmid(); break; case 9: count(); break; case 10: reverse(); break; case 0: printf("Exited successfully"); break; } }while(choice!=0); }
@madcrispy3214 жыл бұрын
SWAPNIL JAISWAL bro apne tail ko traverse kiya he nhi na
@083_subhamsaha23 жыл бұрын
Error is coming can you please help?
@nithinkumar71562 жыл бұрын
Send doubly linked list and circular linked list code
@ashokkumarmajji6158 Жыл бұрын
#include
@AtharvaMalikVlogs2 ай бұрын
Nice bro
@jaydipmakwana76965 жыл бұрын
Thank you so much sir,i can understand link list easily.
@parvathakumaransevaiya4234 жыл бұрын
Insertion at ending 10:18 Insertion at specified position 14:28
@swathy90883 жыл бұрын
So kind of u❤️ Since I only want to watch insertion at position
@muzammilkhan34016 күн бұрын
woww sir. millions of thanks❤❤❤❤❤❤
@subhanullahdanish86802 жыл бұрын
i really understand sir very very thanks from your teaching method
@princesubhash24214 жыл бұрын
tq sir it is very useful and i am a student of lbrce cse
@virendragarje6009 Жыл бұрын
Best explanation 👍
@shraddhakasaudhan39724 жыл бұрын
Best explanation 🙏🙏
@supratimnayek27765 жыл бұрын
I think the loop will be (i=0;i
@supratimnayek27765 жыл бұрын
or i
@sagardixit84324 жыл бұрын
@@supratimnayek2776 pos-1 coz you are initializing i to zero
@sarialail Жыл бұрын
you are the best sir
@BiqSam20025 ай бұрын
I'm in a right place...thanks sir
@christiankassab9882 жыл бұрын
Great video! Good job
@tharunnayak144 жыл бұрын
TEACHING BETTER THAN IIT PROFESSORS. U ROCK SIR
@khushibhatia46783 жыл бұрын
I really appreciate your efforts♥
@harshakumarnomula66485 жыл бұрын
super explanation sir ,Thank you so much sir
@jagadevaas91695 жыл бұрын
Sir need an implementation part..! U teach in very easy method, but still implementation would help us to understand more better...! Thanku
@srikalyani90894 жыл бұрын
Yesss
@carsfromgarage2905 Жыл бұрын
Excellent👍
@fluffy280 Жыл бұрын
struct node{ int data; struct node *next;//self referential pointer it points to itself useful for creating new nodes }; int main(){ struct node *head=NULL,*tail=NULL,*new,*temp;//variables to acess our structure int value; char ch; //node creation do{ new=(struct node*)malloc(sizeof(struct node));//allocating the memory for our node printf("enter any value: "); scanf("%d", &value); new->data=value;//assigning the value to node new->next=NULL;//initially setting the 1st node to null if (head==NULL){//condition1. checking if the list is empty if it is setting the node created as head and tail and next as null head=new; tail=new; }else{//2.condition.if node already present linking the created node to tail and setting it as tail tail->next=new; tail=new;//setting new node as the new tail } //to check if the user wants to create another node printf("do you want to continue to create another node if yes enter (y( if no enter (n): "); scanf(" %c" , &ch); //inside of using fflushstdin leave some space before % symbol to avoid buffer memory }while(ch=='y'); temp=head; while(temp != NULL){ printf("%d" ,temp->data); //always use arrow not dot when aceesing a member in the structure which is of pointer if (temp->next!=NULL){ printf("------>"); } temp=temp->next; } //allocation memory struct node *freePointer=head; while (freePointer !=NULL){ struct node *nextNode=freePointer->next; free(freePointer); freePointer=nextNode; } return 0; }
@esakkiram89993 жыл бұрын
really interesting class sir and nice understanding thank you sir
@nagasundar81213 жыл бұрын
Sir if u don't mind can I correct the error in the last code that's means insertions of list at specific position in that ,, the for we had written is wrong ;; that is (i=0;i
@usmaanrangrez34452 жыл бұрын
but if we write pos code doesn't work!
@just_believer Жыл бұрын
Sir wla insert at specific position shi h ki nhi aur agr nhi h to dhi wla bhj dena
@just_believer Жыл бұрын
Ye insert at specific position shi Hain kya bro aur glt hai to shi wla bhj do
@haniawanhaniawan86385 жыл бұрын
thanks for a such easy way of understanding link list
@saddishpillay10974 жыл бұрын
Super sir..u teaching nyc
@yogeshdeolalkar53264 жыл бұрын
Good explanation
@rakeshdebata50604 жыл бұрын
Well explanation sir and thanku so much for this 👍👍🙏🙏
@dipukanchan33125 жыл бұрын
Thanks sir...very good explanation
@ipirates34495 жыл бұрын
Sir u are too good.amazing
@singireddyvenkatameghanath97855 жыл бұрын
Data structures is the important for the cse students
@veerakumarn7393 жыл бұрын
yes, it is very important to all those who are performing with the elements...And if you want to reduce the time complexity and memory occupation it will help you a lot
@vidhyamanoharan91912 жыл бұрын
Thank you so much sir😊
@mickyman7534 жыл бұрын
that for loop of any position gives same result for both 0 and 1index ,so we should change it else if we wanted to insert at beginning or at index 1 with any position function will lead to same result ,i.e. insert at index 1
@upenderguguloth59543 жыл бұрын
Excellent sir
@anshumanmishra25554 жыл бұрын
#include #include struct node { //Structure named node to store integer in variable data and a pointer variable which can store address location of next node int data; struct node *next; }*head; void insert(int data) { //This function will insert a new node to the start of the linked list struct node *temp = (struct node*)malloc(sizeof(struct node)); temp->data=data; temp->next=head; head=temp; } void delete() { struct node *temp; int loc,len,i=1; printf("Enter the location"); scanf("%d",&loc); struct node *p=head; while(inext; i++; } struct node *h=p->next; p->next=h->next; free(h); } void display() { struct node *temp=head; if(temp==NULL) { printf("The list is empty"); } else { while(temp!=NULL) { printf("%d->",temp->data); temp=temp->next; } } } int main() { head=NULL; insert(1); insert(2); insert(3); insert(4); insert(5); insert(6); display(); delete(); display(); return 0; }
@srinivasulupulijala82654 жыл бұрын
Without execution its nothing!
@shrutishrinetra4 жыл бұрын
Best explaination
@shraddhakasaudhan39724 жыл бұрын
thank you sir
@suhild45793 жыл бұрын
Thank You ❤️
@QuranicMoments3 жыл бұрын
Thnx a lot 👍
@thhummim31233 жыл бұрын
you are 1st
@mussadiquejakati48405 жыл бұрын
Thank You So much !!
@veeralakshmimuddana58315 жыл бұрын
Nice classs sirrr
@Sanatani-c1t6 ай бұрын
Please anyone tell is this course is comleted and also for C langauge
@humanplanet87285 жыл бұрын
Sir, I couldn't understand the statements written inside of for loop, in the case of specific position.. could explain it to me here in comment, it's quite confusing. It'll be a big help. Also the i value is not used in the body of loop, The iteration will happen only once so why? Please clarify my doubts, I the more I see the explanation in video the confused I get! Please help.
@farabimahbub59105 жыл бұрын
only the first statement is inside the for loop(that is why sir did not use parenthesis). The loop runs until we get to our desired position(pos-1)
@just_believer Жыл бұрын
@@farabimahbub5910insert at specific position algorithm shi h
@sudhanshusharma285 жыл бұрын
Sir can we write this steps in algorithm on beginning,ending and specific position tell me sir plzzzzzzzzzz
@dpavankumar51384 жыл бұрын
👏👏👏👏 Sir, please explain with program U are explaining directly by assuming pointers Many programs are available at websites
@muhammadahmadyousaf28244 жыл бұрын
the trick is to learn the algo understand it ... then perform it using any language you want.. for me i like java and C#
@bilalabida82915 жыл бұрын
Thank you 🙏
@jithukumar99964 жыл бұрын
Tq soo much sir
@ashutoshsingh47375 жыл бұрын
thank you very much sir
@govindasharma90774 жыл бұрын
Great
@code_programme5 жыл бұрын
Sir I think in insertion at ending tail->next=new should come first followed by new->data=value and new->next=null.Correct me if I am wrong.
@dharanipriya23904 жыл бұрын
Yes,correct
@pvssandeep28363 жыл бұрын
@@dharanipriya2390 i think those 3 can be written in any order
@jagadheeswarikolli28485 жыл бұрын
Tnq sooo much sir
@srikalyani90894 жыл бұрын
I think there is a mistake at entering a new node at a specified position can u clarify it for me???
@kowshikk13753 жыл бұрын
Sir,I have a dought [if we want to create a array of 40 elements we run a for loop to reduce the size of the code and to save memory but when it comes to linked list if we want to create a linked list of 40 nodes then can't we use a for loop to create linked list so that we can reduce the size of the code]
@usharanitummala31063 жыл бұрын
why cant u use a for loop u definetly can use a for loop..!!!
@hanscesa56784 жыл бұрын
Do u still create test cases for insertion at specific positions? (i.e, it has to be part in the list.)
@srinivasraosangamreddy56743 жыл бұрын
👌
@ravinandan13453 жыл бұрын
Are you from Machilipatnam
@sundeepsaradhi3 жыл бұрын
Yes
@balakasandeep3882 Жыл бұрын
❤❤❤
@kasamadhu35093 жыл бұрын
sir malloc gives contiguous memory locations,why we are taking different adresses for each node , if we add new+size of struct node we will get right adress for another node they are contiguous na,
@peddadoddisunilkumar6964 жыл бұрын
Hai sir can we get some programs for this concept can we get some link
@indianlegendking90717 ай бұрын
Sir, for second iteration condition fails so how can we do?😢😢😢
@singlegirlchallenge21623 жыл бұрын
Sir initially there is no elements in list then how to insert a new element at begging
@niharikak87104 жыл бұрын
Sir please explain the program on single linked list
@santhoshkondaveni39 Жыл бұрын
sir this program not run in online gdb. suggest any ide other than turbo c.
@inzamamulhaque91984 жыл бұрын
What is the type of temp variable in specific insertion part
@balakrishnana.k32934 жыл бұрын
It is temporary variable.. we can't go with head always BECAUSE head always pointing first node of entire list .. so in order to tracking the nodes we have to use temp as temporary
@gamerdon64 жыл бұрын
Type of temp variable is STRUCT node same as head or tail
@gamerdon64 жыл бұрын
@@balakrishnana.k3293 you were not even answering wt he asked lol
@venu54165 жыл бұрын
Thanks sir
@AkashKV-ne8wi3 ай бұрын
Sir, i did not understand, insertion at specific position, what i didn't understand is, why did we initialise temp=head, temp=temp of next and why did we declare temp? Please help me sir...
@sahalcheruvadi19545 жыл бұрын
Thanks
@R_sravani5 жыл бұрын
Thanku sir I have a doubt that y we. Wrote POS -1 mean what
@shibili23325 жыл бұрын
It is to get the correct position that is the new node will come after position 1,so the new node will be at position 2. If we change the condition to i
@sameershaik86573 жыл бұрын
types of linked lists explanation sir
@gouthamireddy64505 жыл бұрын
Hai sir, Linked list representation and Linear list representation, are both are same, if not what is the difference, can u explain sir?
@sudhirverma70825 жыл бұрын
great
@Vishuu1964 жыл бұрын
Sir at ending we can put any number suppose we can put 10 2000
@globe29294 жыл бұрын
Applications of linked list topic pettandi sir
@bhanuprasadbaddam1464 жыл бұрын
will write algorthim for it sir,for better explanation
@srikalyani90894 жыл бұрын
If we r moving temp to temp->next then why don't we use temp of prev ,for entering adress of new node to 1 position
@eswargunda38523 жыл бұрын
Teaching part is best... Take care about the damn light 💡💡 sir... The board is not visible clearly sometimes
@keysangyonthan5 жыл бұрын
how will the PC know what position is 2? we haven't assigned anything particular in order to calculate the length of LL
@anantsharma66995 жыл бұрын
like in array indexing, the comp is able to know the indices of linked list as well. And indexing starts from 0.
@anishjay33593 жыл бұрын
Tq
@renujhamnani94175 жыл бұрын
Sir we are making *head and *tail variables but how will the compilor undersrtand that head is first element and tail is the last element ?
@keysangyonthan5 жыл бұрын
watch the previous video, we point to head to new(the first LL) and then don't change it, while changing the tail simultaneously as we add more nodes.
@srikalyani90894 жыл бұрын
What's the difference between linked list and single linked list????
@vinothvk27115 жыл бұрын
Stament should be in outside for loop???
@farabimahbub59105 жыл бұрын
just the first statement will be inside the loop(which is why he did not use any parenthesis)
@arastusharma4395 жыл бұрын
Its obvious 😜!
@harshchoudhary99864 жыл бұрын
Sir while writing the code plz write on side what value,new,temp denotes it's a bit confusing
@rku53503 жыл бұрын
Sir kuch classes hindi me diya kro
@DilleswaraRaoAmballa-br2zp4 ай бұрын
insertion at specific position value =34 but the position is 3
@-PAUL-ub3bz3 жыл бұрын
sir intlo AC pettiyandi
@kirank65865 жыл бұрын
What is a Generalized Linked List
@ThankGod1435 жыл бұрын
Trace the loop and explain that will be helpful its really confusion statements should be inside r outside the loop please clarify it...
@arastusharma4395 жыл бұрын
Only one statement will be inside the loop ! The first statement!
@kollunageswarrao51794 жыл бұрын
Is datastructures in c and in python are same?
@sushanthreddy5124 жыл бұрын
sir please provide the full code
@allennamdeo38024 жыл бұрын
I suppose You should say "data of new" instead of "new of data"..🤔🤔
@Sahasb3604 жыл бұрын
No its syntax is that way!!
@shahsikalagowda183 Жыл бұрын
Or pls share the code in description link
@abinashcreation55754 жыл бұрын
Sir , insertion should not completely understand
@nikhilamadhamshetti88932 жыл бұрын
Sir say circular double linked also
@syagamreddysrilakshmi67075 жыл бұрын
Head = new can you explain once sir
@keysangyonthan5 жыл бұрын
head points to new
@shahsikalagowda183 Жыл бұрын
Sir implementation
@malothvenkanna46664 жыл бұрын
Hai sir l want insert and delete linked list full program only plz sir