Your way of teaching and presenting makes the subject easy to grasp ✊ and the best 🌟 thing is that you do all this under 6-8 minutes(speaking generally).
@-saltless4 жыл бұрын
I've tried to figure this out all day. This video is straight to the point and goes thru line by line
@isteak.0023 Жыл бұрын
for those who are confused about the part " while (ptr->link != NULL) " and (ptr!=NULL): it would't be (ptr!=NULL) cause during node 3(3000) ,it satisfies the condition (ptr!=NULL ) ,so ptr becomes ptr->link =NULL . So in next part to assign temp in ptr->link first we need ptr .but as it has become NULL (mentioned earlier) simply ptr->link doen't exist anymore. It was my understanding . pardon my english.
@fatimaachbout9284Ай бұрын
but the ptr will not have NULL ever , the NULL will be just in ptr->link , I didn't get it 🥲
@skekramak4725Ай бұрын
same@@fatimaachbout9284
@ajmalkhaniit4 жыл бұрын
Sir you explain each and everything in such a manner we go to automatically deep of the subject Amazing
@ahmadaklakh6736 Жыл бұрын
Jindagi me pahli bar esa teacher dekha Jo enta difficult chapter ko easy bana Diya thank you so much sir ❤❤❤❤
@iqbalahmed91284 жыл бұрын
Im d frst student for the lecture.!! Yayyy way to go neso... very well done
@aspiredifferent80852 жыл бұрын
Kitna aasani se samjha diya sab kuch NESO ACADEMY ke aage koi nahi hai .
@ecea044gauravgogoi74 жыл бұрын
this is the best channel on youtube , please keep uploading the other data structures after linked list also
@dhananjay99232 жыл бұрын
great explaination since morning 8 am im not understanding this inserting and linked list now its 10 pm finally all doubts are clear and now im doing on my vs code
@AishLovesSpaghetti3 жыл бұрын
Great Explanation. The function add_at_end can also be created without creating pointer ptr. We can just use head variable in the loop. Some might say that it's not possible because this will change the value in the head variable; however, this won't happen because address in head variable can only be changed inside main function where it was created. Only the copy of the value stored in head (in add_at_end function) is enough to traverse the list. This can be used to reduce the space complexity.
@sallavatsal2 жыл бұрын
Amazing lectures! Thanks a lot Neso Academy and the instructors for making such good content and that too for free! :)
@indanadeevena4597 Жыл бұрын
Isn't that sooo.....🤩😇 For your teaching...👏👏
@lipsa-rameshsamal80975 ай бұрын
No 1 playlist...neso academy ❤
@SatyaPrakash-ol9gv4 жыл бұрын
Sir plzz upload stack queue and other parts of ds videos....ur way of explianing and visualization is speechless
@dudefx89714 жыл бұрын
Hey neso academy! Are you guys fine? You haven't uploaded videos. Hope u guys are doing well!
@nesoacademy4 жыл бұрын
Yes, we're fine. Thank you for asking. We will upload the next lecture today.
@thrivewise14 жыл бұрын
An in-depth explanation of the linked list concept. Great Work!! I hope you are going to make videos on other data structures too.
@DatasafeWorld Жыл бұрын
You make difficult concepts sound so easy.
@yuechenxiao42282 жыл бұрын
Thank you soooo much for sharing this,making learning programming in C much easier(also teaches me to understand indean accent lol
@emperoraurangzeb46162 жыл бұрын
From Where ur actually ?
@Saikrishna.B Жыл бұрын
*indian
@Lordash2343 жыл бұрын
finally someone who explains algorithm
@photolab6712 Жыл бұрын
superb playlist... best videos on linkedlist
@allinonesomespecial42 жыл бұрын
These videos make excitement to learn DSA .🎉👍
@mikeorioles3 жыл бұрын
This video is an epiphany. Thank you so much.
@uttamkarmakarece35343 жыл бұрын
You and your teaching skill is awesome sir
@alexander-ud9bs Жыл бұрын
you are the best bro thank you for this course
@selfyqueen26052 жыл бұрын
You guys are giving way too good content.thank you so much these lectures are helping me a lot.🙇♀🙇♀
@dipankar97004 жыл бұрын
Very easy to understand Thanks sir U r best 😁😁😁😁😁😁
@dipeshsamrawat79573 жыл бұрын
I love Neso Academy. 💝
@harroopsinghgala64054 жыл бұрын
First of all, Thanks for such an easy explanation. Can you please upload video lectures on Microprocessors(8085,8086,8251,8259,etc) since we are facing problem in that subject too.
@AbhishekSingh-cu1fe3 жыл бұрын
Awesome Teaching Sir!! Superb 😍
@venkyssss4952 жыл бұрын
Thanks a ton team for making these videos :). In fact thanks is a small word for the kind of content you guys produce.
@SimranjeetkaurWarwal2 жыл бұрын
Big fan of ur voice sir🥰😁
@aniketshivhare6014 жыл бұрын
Create a variable which indicate the last node of list named "tail" tail contain adress of the last node of linked list using this approach we don't need to travsel whole list to add the node in the last.
@codingstuff524 жыл бұрын
love you bro
@kacperos27203 жыл бұрын
You are a life saver! Thanks
@muhammadzakiahmad80693 жыл бұрын
Thanku I was struggling doing the same in python but this made it lot easier though in C.
@MrCEO-jw1vm8 ай бұрын
Brilliant! Thanks so much!
@gaboneitormiaw3 ай бұрын
thank you so fucking much, after struggling with this for a few days, now i can easily understand what is happening
@GousePeera-r4r5 ай бұрын
Thanks bro 😊
@shubhangishreya14922 жыл бұрын
Thank you so much , for explaining very clearly. By using pictorial representation ..
@reverbism2 жыл бұрын
Thank You 4/04/2022 2:47 am
@johnjohn77952 жыл бұрын
Damn good explanation ....love it ❤️❤️
@vishalmpj94852 жыл бұрын
thank u it's easy to understand
@mamo100 Жыл бұрын
So great explanaition that raisded a question for me: shouldn't we use a double pointer in "add_at_end" function? The head seems to be lockal in the function.
@monkman6705 ай бұрын
you are amazing
@shivanshbhardwaj58414 жыл бұрын
amazing video sir!
@ShivarajNallagorla8 ай бұрын
Please show the output of codes
@rahuldusad293 жыл бұрын
sir please course complete pdha do sir bhut acha smjhya h apne
@sadiaafrin26233 жыл бұрын
Your are the best
@roshangogu26702 жыл бұрын
Helpful❤
@palashchandradas32772 жыл бұрын
Thank you so much.
@GAaron-uc9nm4 ай бұрын
why can we use head->link->link = temp .....?
@mischieviousgirl10 ай бұрын
5:21 code
@deepalikatara65314 жыл бұрын
Sir please provide the video lectures of design and analysis of algorithm for preparation of gate
@deepakpandey21004 жыл бұрын
Thank You 😊
@nikhilsachan85984 жыл бұрын
Thanxx sr😊
@zichangprayingtothelord60873 жыл бұрын
At very end of addtoend function, don't we need to mention head=ptr?
@BREACH_X3 жыл бұрын
Im getting this error please help me with this error: 'head' undeclared (first use in the function). How to solve this i use the exact code as shown on the video but it gives me error it does not work
@afreenpoly3 жыл бұрын
Sir Are you uploading these code somewhere? I want the code
@tayyab.sheikh7 ай бұрын
Takeaway for me! You cannot learn data structures without making and understanding figures.
@Krishna-ek9jk3 жыл бұрын
Your presentation and explanation good but what about remaining topics in neso app
@A2312GORREAARON4 ай бұрын
can we use head->link->link = temp , no need to traverse the list....?
@sudheerjalli47074 жыл бұрын
When will you upload entire data structures nesoacademy plz upload soon????
@tradertrader25203 жыл бұрын
4:50 I didn't get why not ptr !=null???
@akashpraveen98143 жыл бұрын
If we use ptr!= null, when ptr points to 3000, the condition executes and ptr->link part will get assigned to ptr( i.e) [ zero will be assigned to ptr].if this happens we can't able to find the last node where new node to be inserted..so instead we are check the node link part is zero or not
@AshokKumar-ix4nf3 жыл бұрын
@@akashpraveen9814 but it have NULL value why it wouldn't assign NULL instead of 0 can u clear my doubt
@akashpraveen98143 жыл бұрын
@@AshokKumar-ix4nf sorry, i didn't get you
@vaibhavmourya653 жыл бұрын
@@AshokKumar-ix4nf it's a same thing Null Or zero
@rodwynnejones4 жыл бұрын
Is there a reason why your doing "ptr = head" rather than just using the "head" (that you've actually passed to the function) in the "while" loop? I've done it both ways and both work.
@dimi59292 жыл бұрын
if you use "head" you won't be able to access the first node as it would then point to a different node.
@sukshithshetty83492 жыл бұрын
This code doesnt work, how should head be defined here?
@saiharshagurijala20663 жыл бұрын
this program won't execute correctly because there is no printf function. am i correct?
@JosephMokua-o5t5 ай бұрын
It executes bro
@punky63204 жыл бұрын
First, thanks for your knowledge sir! For those who got error or something else, you may try this code: #include using namespace std; struct Node{ int data; struct Node *next; }; void add_at_end(Node *head, int data) { Node *ptr, *temp; ptr = head; temp = new Node; temp->data = data; temp->next = NULL; while(ptr->next != NULL) { ptr = ptr->next; } ptr->next = temp; } int main() { // Create a first node with data '45'. Node *head = new Node; head->data = 45; head->next = NULL; add_at_end(head, 98); // add second node. add_at_end(head, 3); // add third node. add_at_end(head, 67); // add forth node. Node *ptr = head; while(ptr != NULL) { cout
@NishantSingh-br6iu2 жыл бұрын
Thanks Brother 😊
@vaibhavborane67632 жыл бұрын
I did not got the cout
@istutirajeev3 жыл бұрын
Can you please tell that, are we supposed to call free( ) function for *ptr and *temp...within add_at_end( ) function?
@chandrikaiyer91414 жыл бұрын
Can't we do using two pointers only as we did in previous lectures
@nakulrajkr Жыл бұрын
What if the list is empty when we try to insert a node? We have to check that, right?
@tulikagupta39983 жыл бұрын
hey this program is giving ivalid conversion from void* to *node i am not able to sort this out can you help
Sir am compiler not able to call function for add node
@alpha-vy9ej4 жыл бұрын
Sir please upload the video of graphs in dfs and bfs concept in code
@Cat_Sterling4 жыл бұрын
What would be a good way to cover an edge case with an empty list here? What about this if statement before the while loop: if (ptr == NULL) ptr = temp;
@kuyaq85443 жыл бұрын
yeah i was wondering the same thing
@pankajgopal75744 жыл бұрын
Sir this program showing error, will please solve the problem and send program again.
@ayeshaayesha2325 ай бұрын
Can anyone write the same code using switch case statement ,add at begin,end and specific position.i have tried but showing error.
@eyzhie90962 жыл бұрын
In my case, why does my IDE say Application error when I run this code?
@dominiquefortin53453 жыл бұрын
The use of a caboose is another way and it simplifies all the code. struct node *createList() {struct node *nd = malloc(sizeof(struct node)); nd->link = nd; return nd;}; void insertBefore(struct node *nd, int new_data) {struct node *new_nd = malloc(sizeof(struct node)); new_nd->link = nd->link; new_nd->data = nd->data; nd->link = new_link; nd->data = new_data;}; Now all the other functions get simplified : void add_beg(struct node *head, int new_data) {insertBefore(head, new_data);}; void add_at_end(struct node *head, int new_data) {struct node *nd = head; while (nd->link != nd) {nd = nd->link;}; insertBefore(nd, new_data);}; void add_at_position(struct node *head, int new_data, in pos) {struct node *nd = head; --pos; while (nd->link != nd && pos > 0) {nd = nd->link; --pos;}; insertBefore(nd, new_data);};
@suryatejapaili10 ай бұрын
Give me the notes for stacks and queue with program and algorithms
@shivam-qx2hd2 жыл бұрын
Here is the Executable Code: // how to add node at end #include #include struct node { int data; struct node *link; }; void add_at_end(struct node *head, int data) { struct node *ptr, *temp; ptr = head; temp = (struct node *)malloc(sizeof(struct node)); temp->data = 67; temp->link = NULL; while (ptr != NULL) { printf("%d ", ptr->data); ptr = ptr->link; } ptr = temp->link; printf("%d",temp->data); } int main() { struct node *head = malloc(sizeof(struct node)); head->data = 45; head->link = NULL; struct node *current = malloc(sizeof(struct node)); current->data = 98; current->link = NULL; head->link = current; current = (struct node *)malloc(sizeof(struct node)); current->data = 3; current->link = NULL; head->link->link = current; add_at_end(head, 67); return 0; }
@harijogi1621 Жыл бұрын
tq bro
@MdArman-f7n6j Жыл бұрын
thanks
@yogeshwaranraguraman90785 ай бұрын
Bro, ptr = temp->link; ?? How? temp->link contains NULL right, You are assigning NULL instead of a New node address we have to assign ptr = temp; because temp contains the address of the new node and ptr contains the last link address as a NULL. so you have to assign ptr = temp; is correct. and temp->link contains NULL as already you have assigned. isn't it?
@PriyanshuRawat-db6sl2 ай бұрын
@@yogeshwaranraguraman9078 ya it should be ptr->link=temp;
@22saithejasrireddy163 жыл бұрын
Sir where can I get this code ⁉️
@Nickname1234_2 жыл бұрын
This node is visible only inside the function ....not in main then what's the use
@kaushaljha13843 жыл бұрын
Sir please complete the full code
@GopikaRaja-c7k Жыл бұрын
What is wp =hd ??
@anyagoswami9892 жыл бұрын
Could you plzz provide cmplt code..
@CSstudent_1001 Жыл бұрын
The best 🤍🤍🤍
@istutirajeev3 жыл бұрын
wow!
@harpreetvirk33083 жыл бұрын
5 stars
@ajoydev88762 жыл бұрын
but I can't even understand the difference between of them while( ptr! = NULL) Vs while(ptr -> link! = NULL) Please anyone can clarify?
@akshaya50372 жыл бұрын
ptr stores the address of the node. Like, I think to access elements of the node (data and next address) we need to use ptr->data and ptr->link. Like, if we want to stop when the next address is NULL, we can't be using ptr==NULL right? We want to stop when ptr->link == NULL. Like, ptr == NULL means, node's address is NULL, we can't get that way.... I hope you got it 😅
@austin25082 жыл бұрын
You can think of it this way. we are using ptr -> link = NULL here because: we want to check if we have the address of the next node, we are over-checking (ptr becomes NULL) if we use ptr only. In contrast, for the count and print functions, we use ptr != NULL, because: we are checking the entire node. If we do ptr -> link, we are missing one node. Because the last node is always the format of data, pointer. And this pointer is always NULL)
@karinakumari36712 жыл бұрын
How to print a name using linked list
@aeroabrar_313 жыл бұрын
we can also write the code as ptr = head; while(1) { if(ptr->link == NULL) { ptr->link=temp; break; } ptr=ptr->link; } sir plz complete the play list as soon as possible.....🙏
@nehavashishth93544 жыл бұрын
but when i am printing it ,it is not showing anything.
@rithikvardhanreddy3494 жыл бұрын
Yeah even same problem to me i think its a source code if you know how to do keep comment ..
@abhishekmalviya46674 жыл бұрын
@@rithikvardhanreddy349 i think we have to try ptr->link != NULL instead of ptr != NULL then it should work.............
@roopaligarg7924 жыл бұрын
That might be because the list is initially empty. As soon as you add one node in the list this solution works, else this code needs to handle empty list scenario as well. @nesoacademy please correct me if i am wrong. Try adding this before while loop and it should work fine: if(head == NULL) { head = temp; return; }
@rithikvardhanreddy3494 жыл бұрын
@@roopaligarg792 yeah i think your right once i will try it
@tejagttggt4 жыл бұрын
@@roopaligarg792 no it doesn't work because we r creating an another copy of head in the function, therefore we should use double pointers in the function parameter to reflect any changes to our main list.
@harmeetsingh73812 жыл бұрын
👐
@sukshithshetty83492 жыл бұрын
I am gettin a zero at the start of data at node? why