Inserting the Data at the Beginning of Single Linked Lists (Possible Mistake)

  Рет қаралды 159,451

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 50
@swrjidaimary3871
@swrjidaimary3871 4 жыл бұрын
I love neso academy. I am fully support neso academy by heart and soul.
@rohans2002
@rohans2002 3 жыл бұрын
Before watching the solution in the previous video, I'd tried the EXACT same thing and was confused why it didn't work. Glad I got the explanation here.
@RaviShankar-ow9pu
@RaviShankar-ow9pu 4 жыл бұрын
Sir plzzz increase the frequency of lectures!! 💗💝💗💝
@Zero-ss6pn
@Zero-ss6pn 2 жыл бұрын
You're just awesome. I made this mistake and wasn't aware of this possibility. Kudos to you brother!! Keep producing good content. Thanks a lot
@srivallimadduri1489
@srivallimadduri1489 4 жыл бұрын
Good evening sir! I usually use my Lappy to learn but l opened the playlist in my mobile just to like and support ur channel which helped me to understand DS in a better way 😊.... Waiting for ur next topics of ds sir... Lover for neso academy from Andhrapradesh
@srivallimadduri1489
@srivallimadduri1489 4 жыл бұрын
@Dipen Rana l didn't get if l should consider it as a compliment or a comment....
@karthik9354
@karthik9354 4 жыл бұрын
What do you mean by support?
@srivallimadduri1489
@srivallimadduri1489 4 жыл бұрын
@@karthik9354 support may mean suggesting to few of my frnds which in turn increase the no. Of views to the channel
@nisha..sharma..8554
@nisha..sharma..8554 3 жыл бұрын
@@srivallimadduri1489 support from vizag
@Kotivana_9
@Kotivana_9 26 күн бұрын
Your voice is making shiva thandavam in my ears
@shivanidalal2860
@shivanidalal2860 4 ай бұрын
Best material so far I came across for link list
@FaizanKhan-kn7op
@FaizanKhan-kn7op 2 жыл бұрын
i did this mistake and stuck for 30 min in the code then i decide to continue the lecture and BOOM i got the solution😂
@aashishbhatt4888
@aashishbhatt4888 4 жыл бұрын
Please be consistent sir 🙏🙏🙏🙏🙏🙏
@prabhaskoya
@prabhaskoya 2 жыл бұрын
Really really loved your content 💖💖💖💖
@daverussell4052
@daverussell4052 3 жыл бұрын
totaly clear my doubt in the last lecture
@Harshit-ju2iz
@Harshit-ju2iz Жыл бұрын
That's exactly the mistake I was making ;-; THANKS ALOT NESO!
@dipeshsamrawat7957
@dipeshsamrawat7957 3 жыл бұрын
I love Neso Academy. 💝
@pratik__r__patil8838
@pratik__r__patil8838 4 жыл бұрын
Damn Good yarr ! Fantastic representation and Expalnation.. Sir , you are Great.. We support you sir ..we love THE NESO ACADEMY ... LOVE FROM the whole Maharashtra....
@sarcasticboy4507
@sarcasticboy4507 11 ай бұрын
oh my god you are legend. i exactly though of this when i watched just previous video. thank you for saving my life !!! now i am clear otherwise i also though its not necessay to do head =
@rishikeshraj3252
@rishikeshraj3252 Жыл бұрын
Sir I was also confuse about that i was thinking if I'm passing pointer to add_beg() then it is call by reference then why we should update the head. Thank your sir
@divyamarora777
@divyamarora777 2 жыл бұрын
good evening sir, I am from tech background and I love it thank you love you
@souradipkumarsaha9267
@souradipkumarsaha9267 4 жыл бұрын
Sir you are great...hoping next videos soon ..stay safe sir🙏
@lawrencemuthui
@lawrencemuthui Жыл бұрын
True and in the main function we are able to print the data of the now first node which is 3. Malloc in the add_beg() function allocate memory in the heap section which is available even after the function terminates. Should we free all the memory allocated at the end of the code?
@ambrishabhijatya7842
@ambrishabhijatya7842 3 жыл бұрын
We could pass &head as a parameter to add_beg changing the type of the first argument to struct node** pointerToHead. Easier solution (perhaps a bad one?) would be to just put head in the global scope.
@saurabhkolapkar6277
@saurabhkolapkar6277 4 жыл бұрын
Sir your lectures are awsomes Plz add the lectures of doubly linked list
@Manimeghanath
@Manimeghanath 11 ай бұрын
Thats the exact mistake i made b4 cing this video ........thanx buddy
@orijeetmukherjee9392
@orijeetmukherjee9392 4 жыл бұрын
amazing work!!!
@brianfinch0
@brianfinch0 4 жыл бұрын
sir, please add subtitle for your videos it really helps, thanks
@beeanonymous5032
@beeanonymous5032 4 жыл бұрын
Linked stacks and queues application of linked list. Bro needed this. Can u make a video?
@prashantbhardwaj2675
@prashantbhardwaj2675 3 жыл бұрын
hi neso academy...want to ask a question..we have allocated heap memory to head at the starting so it will not vanish out once the function will call of so how it could be pass by value..i m confused please explain.
@swrjidaimary3871
@swrjidaimary3871 4 жыл бұрын
Sir Can you teach about system call using C like fork(), exec() etc on unix and for Windows CreateProcess (), WaitForSingleObject()
@swrjidaimary3871
@swrjidaimary3871 4 жыл бұрын
Please sir include some basic idea about system call using c or c++
@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);};
@abiadhimoolam1391
@abiadhimoolam1391 9 ай бұрын
Sir pls provide english subtitles also sir
@evssaini
@evssaini 3 жыл бұрын
what if we declare head as global variable? wont it be easy?
@killerqueen6023
@killerqueen6023 3 жыл бұрын
I made same mistake, when performing this myself
@rugved4503
@rugved4503 4 жыл бұрын
plzzz Plz add the lectures of doubly linked list
@A_sudden_stranger
@A_sudden_stranger Жыл бұрын
I was doing this same mistakes 😢
@RohitRoy-cz2lo
@RohitRoy-cz2lo 3 жыл бұрын
Can we use functions of both adding_node_at_end and adding_node_at_beginning to create our linked list,I have tried this and i am getting some error , can anyone guide me in this
@aditidana6159
@aditidana6159 3 жыл бұрын
just wow
@__Kuch_Bhi___
@__Kuch_Bhi___ 9 ай бұрын
👍🙂
@Kim-rh9gt
@Kim-rh9gt Ай бұрын
Double pointer
@snatamkamila8821
@snatamkamila8821 3 жыл бұрын
grate
@DaiMoscv
@DaiMoscv 2 жыл бұрын
then how about we just return ptr instead of head
@AbcnaihauHnahUznnz
@AbcnaihauHnahUznnz 3 жыл бұрын
While writing the code i made this mistake🤣🤣
@mohdmuqeem9291
@mohdmuqeem9291 4 жыл бұрын
Sir please increase time also.videos are too short
@leenasharma4809
@leenasharma4809 4 жыл бұрын
Purse
@squidward7421
@squidward7421 10 ай бұрын
Instead of returning head, you could give head to the "add_beg(&head)" as a double pointer, this way you don't give the value inside of head, but the actually reference to head. In this case the code inside the function add_beg does need accordingly. For readability your way is certainly better. -edit nvm, you talk about this in the next video of the playlist.
@Bhumikabhagat05
@Bhumikabhagat05 10 ай бұрын
wrrongg
Introduction to Linked List
6:21
Neso Academy
Рет қаралды 1,7 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Single Linked List (Inserting a Node at the End)
5:49
Neso Academy
Рет қаралды 426 М.
Single Linked List (Inserting a Node at a Certain Position)
6:52
Neso Academy
Рет қаралды 345 М.
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 2,8 МЛН
Linked Lists - Computerphile
10:11
Computerphile
Рет қаралды 206 М.
2.4 Linked List Implementation in C/C++ | Creation and Display | DSA Tutorials
29:01
Jenny's Lectures CS IT
Рет қаралды 1,9 МЛН
Learn Linked Lists in 13 minutes 🔗
13:24
Bro Code
Рет қаралды 389 М.
Single Linked List (Deleting the First Node)
3:47
Neso Academy
Рет қаралды 200 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН