Reverse a Doubly Linked List in C

  Рет қаралды 48,888

Vivekanand Khyade - Algorithm Every Day

Vivekanand Khyade - Algorithm Every Day

Күн бұрын

Write a program to reverse a doubly linked list.

Пікірлер: 71
@racheljiminseo
@racheljiminseo 5 жыл бұрын
Thank you so much for this perfect explanation..I was struggling understanding reverse doubly linked list until I watched ur video. Thank you again
@dhrupalprajapati317
@dhrupalprajapati317 4 жыл бұрын
Nice sir , completely understood the topic and you are that much down to earth that everyone will like the way of explaining the topics.
@hopesalive2004
@hopesalive2004 7 ай бұрын
I was literally struggling with this q for the last 2 hours, thank you from the bottom of my heart sir 😊
@abdulhadialamri4859
@abdulhadialamri4859 5 ай бұрын
Thanks so much. I just understand reversed Doubley linked list. I was trying to find an easy way to grasp this and I liked what you did here. :)
@vanbap
@vanbap 3 жыл бұрын
I have struggled with this problem for 2 hours. Tks sir its really helpful.
@TheAllen501
@TheAllen501 6 ай бұрын
The 1st time I understand Indian accent. You explained well. Thumbs-up!
@shreyashikha3506
@shreyashikha3506 6 жыл бұрын
U explained in a very easy way... Before I m so much f confusion in linked list but after watching ua video it helps me alot.. Thanku sir for uploading.. Can u plzz upload a video on circular singly linked list.
@sagarbora7768
@sagarbora7768 3 жыл бұрын
Perfect explanation with iterations on every node !Found this svideo insightfull Sr!!!
@misatran1107
@misatran1107 4 ай бұрын
finally, I can image the reverse process : ))) Thank u Mr Vive
@mohmmadsadi7268
@mohmmadsadi7268 7 ай бұрын
That's a great effort from you Vivedanand. But I think you forget the final step which is : To let Head pointer -> pointing to the temp (node 'e') ... Head = temp;
@sherifali484
@sherifali484 Жыл бұрын
Finally i understood it thank you so much , your explanation is really good
@NatureLover-oq6uc
@NatureLover-oq6uc Жыл бұрын
Very Good Explanation...Loved it
@vidpulse4267
@vidpulse4267 Жыл бұрын
your explained is very powerful I hope make more useful video
@krishanudutta2943
@krishanudutta2943 3 жыл бұрын
You explained it very beautifully thanks a lot
@sravanthimarpu562
@sravanthimarpu562 5 жыл бұрын
Thank you sir ....need an explanation for quicksort on singly and doubly linked list
@franciscoencarnacao2156
@franciscoencarnacao2156 Жыл бұрын
Perfect Explanation!! Thank you sir
@vaishnaviv7113
@vaishnaviv7113 Жыл бұрын
Finally i understood the topic thank you sir
@deepanshduggal9742
@deepanshduggal9742 7 жыл бұрын
Take a bow sir! Wonderful explaination
@sheldon9415
@sheldon9415 4 жыл бұрын
Thank you so much for this wonderful video.I totally understand.Very clear and nice explanation!
@7AMzUS2003
@7AMzUS2003 Жыл бұрын
thnx a lot mr vivekanand for your explanation
@birajdaimary2429
@birajdaimary2429 6 жыл бұрын
Sir make a video on circular linked list...and queue too...it will be help us a lot
@stockmarketinvestingforeve6263
@stockmarketinvestingforeve6263 5 жыл бұрын
At the bottom, temp = temp -> prev; shouldn't that be instead head = temp -> prev ; ? Great Video/Explanation, by the way.
@abhinavv5850
@abhinavv5850 4 жыл бұрын
right
@alexlivadaru286
@alexlivadaru286 5 жыл бұрын
Thanks a lot! I really needed this!
@Kgp-ty5dk
@Kgp-ty5dk 5 жыл бұрын
brilliant explanation sir!
@amr19932012
@amr19932012 4 ай бұрын
When was the step that head became tail and tail became head ?
@lsgtalk1996
@lsgtalk1996 3 жыл бұрын
superb explanation
@CodeNinjaByte
@CodeNinjaByte Жыл бұрын
//meathod 1 using temp lag of curr by distance 2 // note that in the last element curr is pointint to NULL temp is pointing // to second last of list soo move to next of it if(head==NULL || head->next==NULL) { return head; } Node *curr=head; Node *temp=NULL; while(curr!=NULL) { temp=curr->prev; curr->prev=curr->next; curr->next=temp; curr=curr->prev;// or curr=temp; } return temp->prev; //meathod 2 using temp ahead of curr // note that in this temp is ahead of curr soo in last case //curr is NUll and temp is at null and we can iterate further //more so terminating condition needed otherwire curr->next is NULL->next(segmentation fault) if(head==NULL || head->next==NULL) { return head; } Node *curr=head; while(curr!=NULL) { Node *temp=curr->next; curr->next=curr->prev; curr->prev=temp; if(temp==NULL) { return curr; } curr=curr->prev;// or curr=temp; } return curr;
@anatulea559
@anatulea559 4 жыл бұрын
thank you! great explanation
@pranavvikharankar7456
@pranavvikharankar7456 5 жыл бұрын
plz sir post videos on how to calculate time complexity of program
@TheFitFiddler
@TheFitFiddler 6 жыл бұрын
Wonderfully explained!
@tadessezelalem6555
@tadessezelalem6555 6 жыл бұрын
tadesse
@RAVIKUMAR-ef4wo
@RAVIKUMAR-ef4wo 5 жыл бұрын
Bhai love you from hyderabad
@anum2471
@anum2471 5 жыл бұрын
explain about priority queue
@DivyaSingh-bl4cj
@DivyaSingh-bl4cj 2 жыл бұрын
09:18 Stamped with love, LINER
@DivyaSingh-bl4cj
@DivyaSingh-bl4cj 2 жыл бұрын
thanks for the great vedio
@ritik84629
@ritik84629 5 жыл бұрын
life saver.thank you
@SilentNight_tour
@SilentNight_tour 10 ай бұрын
good job sir
@ProgrammingLearning-v4c
@ProgrammingLearning-v4c 5 күн бұрын
that is helpful thanks
@rohitmarati8544
@rohitmarati8544 6 жыл бұрын
big thanks to you sir
@football3415
@football3415 7 ай бұрын
Thank you man
@YasenAbker
@YasenAbker 10 ай бұрын
Thanks a lot
@AkshayKumar-nm4ci
@AkshayKumar-nm4ci 6 жыл бұрын
Thanks Nyc Explanation
@aleenayt1870
@aleenayt1870 3 жыл бұрын
Well done
@lokeshg8938
@lokeshg8938 6 жыл бұрын
Please tell the whole program once .next 2 u tell this concept only
@edism235
@edism235 4 жыл бұрын
Thanks so much sir!!
@danact1135
@danact1135 3 жыл бұрын
you're great!!
@anandprakash4995
@anandprakash4995 6 жыл бұрын
Java solution : while(head != null){ DoublyLinkedListNode i = head.prev; head.prev = head.next; head.next = i; if (head.prev == null){ return head; } head = head.prev; } return head;
@Funnyvideos-ih8nx
@Funnyvideos-ih8nx 6 жыл бұрын
plz made a header link list video
@hirasuleman4946
@hirasuleman4946 5 жыл бұрын
Thank u sir☺ Respect from pakistan
@alroygama6166
@alroygama6166 5 жыл бұрын
Fo
@indranilchakraborty5949
@indranilchakraborty5949 4 жыл бұрын
Thank you sir ..
@srinivasanshanmugam9527
@srinivasanshanmugam9527 7 жыл бұрын
Thanks its very explainative
@MiyamotoMusashi23839
@MiyamotoMusashi23839 6 ай бұрын
thanks
@jibranjafry2625
@jibranjafry2625 6 жыл бұрын
thank you sir
@mohamedelhajaji-yr2ee
@mohamedelhajaji-yr2ee 7 ай бұрын
legend
@this.is.sheraf
@this.is.sheraf 10 ай бұрын
Nice
@sudhanshumishra9302
@sudhanshumishra9302 5 жыл бұрын
Its vry complicated
@keerthanasubramanya9880
@keerthanasubramanya9880 6 жыл бұрын
Thank you
@FamousEgyptboy
@FamousEgyptboy 6 жыл бұрын
Thank youuuuuuuuuuuuuu!
@mayankgindodiya4732
@mayankgindodiya4732 3 жыл бұрын
Its throwing TLE on gfg
@Ankitakumari_rnec
@Ankitakumari_rnec 4 жыл бұрын
nice
@FrozenByTheSun
@FrozenByTheSun 7 жыл бұрын
👍🏻
@Adarsh0543
@Adarsh0543 Жыл бұрын
based
@tapanbasak1453
@tapanbasak1453 4 жыл бұрын
vai app maal hain
@imvickykumar999
@imvickykumar999 4 жыл бұрын
something like swapping... !!!
@adarshchougale1106
@adarshchougale1106 5 жыл бұрын
/*This may look easy */ temp=head; while(temp->next!=NULL) { temp=temp->next; } cur=temp; while(cur!=NULL) { printf("%d ",cur->data); cur=cur->prev; }
@moutusimodak1620
@moutusimodak1620 3 жыл бұрын
It's not running. Given input is 10 20 30 40 But output is 40 30 Which is wrong output. How to resolve this error?? Please reply
@MHN1001
@MHN1001 2 ай бұрын
thank you man
@anashaat95
@anashaat95 10 ай бұрын
Thanks a lot
Swap nodes pairwise in Linked List (nodes in pairs)
15:14
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 44 М.
Reverse a linked list - Iterative method
13:50
mycodeschool
Рет қаралды 780 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
L6. Odd Even Linked List | Multiple Approaches
24:05
take U forward
Рет қаралды 122 М.
you will never ask about pointers again after watching this video
8:03
Reverse a Linked List Code/Algorithm/Program
9:03
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 109 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 251 М.
2.16 Insertion in Circular Linked List | Data Structure Tutorials
19:45
Jenny's Lectures CS IT
Рет қаралды 230 М.
zig will change programming forever
9:34
Low Level
Рет қаралды 405 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН