Inserting the Data at the Beginning of Single Linked List (2nd Method)

  Рет қаралды 130,979

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 60
@AlmogYosef520
@AlmogYosef520 4 жыл бұрын
Just great!! The visualization of the pointers and lists is so good! this is the way to teach these things otherwise it just confusing. I think every student should view your lectures even though they familiar with the subject. Thanks again :)
@devashish_manna
@devashish_manna 4 жыл бұрын
Just wanna say thank you Neso Academy. I followed your videos throughout the last four years of my engineering. You made my life easy.
@devashish_manna
@devashish_manna 4 жыл бұрын
@carryMinati I am not the right person to answer this question mate. But you should always do what you like, work will not feel like work if you do something that you like.
@NiranjanKJ-w6n
@NiranjanKJ-w6n Жыл бұрын
I was stuck with this doubt thanks for clearing it out, great help.
@uniqueelsa5959
@uniqueelsa5959 3 жыл бұрын
Every video of Neso Academy leaves me with a single doubt that HOW CAN IT BE SO UNDERRATED?
@vamsikrish7640
@vamsikrish7640 Жыл бұрын
nyc promotion they dont pay you money
@PlrYdei
@PlrYdei 8 ай бұрын
BEST CHANNEL ON ALL KZbin! THANK YOU SO MUCH!
@kajalmondal9745
@kajalmondal9745 4 жыл бұрын
Just another great tutorial. But please sir at least one video everyday. Please sir please. .......
@AstitvGupta2708
@AstitvGupta2708 11 ай бұрын
It's something like:- "Making one mistake to cover up another mistake!" 😅😂
@maca4137
@maca4137 4 жыл бұрын
I know you guys are working too hard to provide free quality education but my request to you guys is to upload at least 1video per day on data structures, please its my request And video was great as usual thank you🙏
@nesoacademy
@nesoacademy 4 жыл бұрын
We’re trying our best to upload 15-20 lectures in a month.
@himanshuthakkar5963
@himanshuthakkar5963 4 жыл бұрын
@@nesoacademy Yes sir thank you for this but all subscriber want to this data structures as possible as fast so please Thank you 👍👍👍
@kunalkhallar9699
@kunalkhallar9699 Жыл бұрын
I learnt the basics of C language from somewhere else, but @NesoAcademy has made my concepts and understanding even more stronger. Thank you very much. 🙏🏼🙏🏼
@sajadulislamdipu1954
@sajadulislamdipu1954 4 жыл бұрын
Dear sir please complete this series as soon as possible.❤
@salvadorjohndeniel
@salvadorjohndeniel 4 жыл бұрын
why so demanding?
@dipeshsamrawat7957
@dipeshsamrawat7957 3 жыл бұрын
I love Neso Academy. 💝
@BrowsingScholar
@BrowsingScholar 2 жыл бұрын
very helpful, thank you for your honorable work.
@dennyage4791
@dennyage4791 3 жыл бұрын
Oohh, great concept 🔥🔥🔥
@sunnydeol2011
@sunnydeol2011 3 жыл бұрын
The easiest way is to declare the head pointer globally, then we won't have to pass the pointer or address. Passing just the value to be inserted in the linked list would be enough.
@arunasishsom9190
@arunasishsom9190 3 ай бұрын
Yes that works too
@jaydomadia9182
@jaydomadia9182 4 жыл бұрын
Giving slightly different names to the actual and the formal parameter reduces the chances of errors.
@aliozdemir181
@aliozdemir181 Жыл бұрын
This guy is like Messi. THE GOAT !
@lexingtonjackson3657
@lexingtonjackson3657 2 жыл бұрын
Who else feels gifted to be studying computer science at a time when neso academy has already completed thier playlist😍😍
@hritikrastogi3335
@hritikrastogi3335 3 жыл бұрын
dear sir, now i can make program even before watching video . mistake encountered in previous lecture, I also had culprit of that and resolved on my own
@herohera3497
@herohera3497 Жыл бұрын
void add_at_beg(struct node **head,int data) { node* beg = new node; beg -> data = data; beg -> next = *head ; *head = beg; } you can try this too.
@kusumaseera3753
@kusumaseera3753 4 жыл бұрын
Sir sir please upload c++ tutiorals sir please it's my humble request🙏🙏😭
@himanshuthakkar5963
@himanshuthakkar5963 4 жыл бұрын
Yes sir please
@hetaeramancer
@hetaeramancer 3 жыл бұрын
There is now a C++ playlist, but it will probably take 3 years to be fully finished haha
@vamshikrishnam9206
@vamshikrishnam9206 4 жыл бұрын
thanks
@vishwaskumar2619
@vishwaskumar2619 4 жыл бұрын
@Neso Academy team, are you going to teach doubly, circular linked list,tree in upcoming videos under data structure section.
@MarufHasnat-d5w
@MarufHasnat-d5w 4 ай бұрын
then why in case of adding node in the end, when we use void, it permanently changes the main function of head
@riviayanuar6296
@riviayanuar6296 3 жыл бұрын
I've been using global structs to overcome this problem. Is my method good or should I use the method in the video instead?
@ravendelarama426
@ravendelarama426 3 жыл бұрын
same question
@rajeshprajapati6662
@rajeshprajapati6662 2 жыл бұрын
giving access to all functions can cause unpredictable results in projects.
@nookajayadeep7074
@nookajayadeep7074 11 ай бұрын
In another slide ur showing the continuation code we need to write and run that also.
@TotalLearning093
@TotalLearning093 4 жыл бұрын
Sir neso app pe network analysis complete upload kar dijiye pls
@nesoacademy
@nesoacademy 4 жыл бұрын
Creation ka kaam chal raha hai, Neso Academy App pe aayenge remaining chapters.
@ohhhokkk391
@ohhhokkk391 2 жыл бұрын
Can we do the same when inserting at the end
@nikhilhaspe2734
@nikhilhaspe2734 3 жыл бұрын
or we can define head pointer as a global pointer variable so that we can use it from every function
@GajulaSaikumar-ju7rl
@GajulaSaikumar-ju7rl Жыл бұрын
Here ptr is a structure Is structure can be null
@anjalibhanaria9281
@anjalibhanaria9281 4 жыл бұрын
why is call by value not a problem when we want to add something to the end of linked list
@ambermolina2711
@ambermolina2711 3 жыл бұрын
Why don't you need to return a pointer when inserting at the end of the linked list?
@AnirbanBanerjeeBPS
@AnirbanBanerjeeBPS 2 жыл бұрын
Best
@dominiquefortin5345
@dominiquefortin5345 3 жыл бұрын
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);};
@gauravshinde8767
@gauravshinde8767 3 жыл бұрын
Why to un-necessarily make it complicated with second method
@hetaeramancer
@hetaeramancer 2 жыл бұрын
haha
@aashishbhatt4888
@aashishbhatt4888 4 жыл бұрын
Sir linked list abhi kitni videos aur aayengi please reply
@nesoacademy
@nesoacademy 4 жыл бұрын
Abhi kaafi lectures hai iss chapter me.
@aashishbhatt4888
@aashishbhatt4888 4 жыл бұрын
So I request you to atleast 1 lecture per day
@ajan7644
@ajan7644 4 жыл бұрын
@@nesoacademy I am preparing for gate and your teaching is awesome but by this speed how I complete this subject for gate 2021
@himanshuthakkar5963
@himanshuthakkar5963 4 жыл бұрын
@@nesoacademy ok no problem but atleast try to publish 1 video per day it is humble request you dear sir 👍👍
@Family_12362
@Family_12362 2 жыл бұрын
It was showing error
@heath1739
@heath1739 Жыл бұрын
you don't even need to use double pointers just add the last node and return nothing
@__Kuch_Bhi___
@__Kuch_Bhi___ 9 ай бұрын
🙂👍
@Family_12362
@Family_12362 2 жыл бұрын
It's not compiling
@arulk4696
@arulk4696 4 жыл бұрын
Sir please update python programming..
@vamsikrish7640
@vamsikrish7640 Жыл бұрын
your programes are not running correctly waste of time
@prabhjotsohal4621
@prabhjotsohal4621 11 ай бұрын
my bra in is not braining here
Inserting the Data at the Beginning (Singly Linked List vs. Array)
7:28
Single Linked List (Inserting a Node at a Certain Position)
6:52
Neso Academy
Рет қаралды 347 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Learn Linked Lists in 13 minutes 🔗
13:24
Bro Code
Рет қаралды 396 М.
you will never ask about pointers again after watching this video
8:03
Single Linked List (Inserting a Node at the Beginning)
5:37
Neso Academy
Рет қаралды 528 М.
Introduction to Linked Lists (Data Structures & Algorithms #5)
18:47
Single Linked List (Inserting a Node at the End)
5:49
Neso Academy
Рет қаралды 428 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 649 М.
How to Create a Linked List C++ Introduction to Linked Lists
12:24
Paul Programming
Рет қаралды 947 М.
Introduction to Linked List
6:21
Neso Academy
Рет қаралды 1,7 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН