L4. Reverse a DLL | Multiple Approaches

  Рет қаралды 98,389

take U forward

take U forward

Күн бұрын

Пікірлер: 85
@purushottam108
@purushottam108 5 ай бұрын
17:21 "And the interviewer will hire you,no worry" best part🤑🤑🥰🥰
@Thunder97654
@Thunder97654 5 ай бұрын
😂
@aanandshukla
@aanandshukla Ай бұрын
😅
@PCCOERCoder
@PCCOERCoder Күн бұрын
😂😂
@qihse1531
@qihse1531 Жыл бұрын
This simple problem is insanely hard to me...thank you Striver!!
@keshavchoudhary8857
@keshavchoudhary8857 10 ай бұрын
this type of great content cannot be found elsewhere , Excellent!!!
@AlwaysOntopoftheworld
@AlwaysOntopoftheworld 10 ай бұрын
Is kunal kushwaha better or this one?
@Ayush37262
@Ayush37262 9 ай бұрын
​@@AlwaysOntopoftheworldI think Striver, Kunal is more into Controversies
@FaizShaikh-dt8wp
@FaizShaikh-dt8wp 2 ай бұрын
You are really doing a revolutionary thing 🔥, Belive me you will definately going to have a huge audience just keep doing striver! Complete the DSA series from A to Z 🔥 before 2024 ends.
@AmanSharma-xy1qm
@AmanSharma-xy1qm 11 ай бұрын
All the video lectures and the articles helped me a lot to gain confidence in DSA and will be helping me in the interviews. Thank you Striver bhaiya for bringing such amazing content for free.
@vaibhavvm4147
@vaibhavvm4147 10 ай бұрын
Bro how do u approach DSA, do u first watch videos and then solve it on ur own or how?
@AmanSharma-xy1qm
@AmanSharma-xy1qm 10 ай бұрын
initially, i learn first the therory part like methods that are used in this, and i usually watch Striver's playlist of that topic , and learn the patterns of the questions then i go to leetcode and gfg and solve same patterns problems. With the approaches i learned from Striver. That's all. Hope you got this.@@vaibhavvm4147
@Rahul_Mongia
@Rahul_Mongia 8 ай бұрын
@@vaibhavvm4147 video dekh le bhai, dimag khol......., phir related ques khud try kar
@harshitgarg2820
@harshitgarg2820 Жыл бұрын
Loved your dedication sir, completed this ques and loving this series like all others. Top-tier content🔥🔥
@MdallShahria
@MdallShahria Жыл бұрын
you are the boss .. please make a playlist about competitive programming.
@shubhamanand8557
@shubhamanand8557 8 ай бұрын
It really helps me to understand in a very easy manner. Thanks a lot bhaiya.
@Sunny-hg5oe
@Sunny-hg5oe 7 ай бұрын
Great thought of using the stacks!!!!
@aravindsagar9433
@aravindsagar9433 6 ай бұрын
instead of using next ad back which is a bit ambiguous you could've used next and previous ( prev ) which will be more understandable
@itsorcus649
@itsorcus649 4 ай бұрын
🤓
@BeWarrior-dw4br
@BeWarrior-dw4br 10 ай бұрын
The takeuforward website is not loading .. I'm trying to access the A2Z sheet for the last three days but it is not working.
@guneeshvats46
@guneeshvats46 5 ай бұрын
Dude your lectures are amazing
@PCCOERCoder
@PCCOERCoder Күн бұрын
Lecture successfully completed on 26/11/2024 🔥🔥
@RRR-qv1so
@RRR-qv1so Жыл бұрын
Thank you for this amazing playlist bhaiya ❤❤
@shanipratapsingh916
@shanipratapsingh916 4 ай бұрын
Thank you sir this amazing lecture 🥰
@Vvvvviieiei123
@Vvvvviieiei123 Жыл бұрын
lecture 4 done,love u bhaiya
@ankit-jangid
@ankit-jangid 11 ай бұрын
nice explanation brother, 1 thing I'd like to advice is please use the same variable names while coding which you use while explaining, it would be helpful. Good work and your videos are great!!✌🏻😇 thanks
@lifehustlers164
@lifehustlers164 11 ай бұрын
17:20 , dream come true!!!
@aashwinkumar2242
@aashwinkumar2242 2 ай бұрын
i guess there is an even more optimised solution now since the link is showing time limit exceeded in this approach . i did everything the same
@aaryangupta4505
@aaryangupta4505 11 ай бұрын
if(head==NULL||head->next==NULL) return head; Node* temp = NULL; Node* curr = head; while (curr != NULL) { curr->prev = curr->next; curr->next = temp; temp=curr; curr = curr->prev; } return temp;
@aashwinkumar2242
@aashwinkumar2242 2 ай бұрын
yup thats what i did , made it much simple to understand you have to return temp->prev
@karthik-varma-1579
@karthik-varma-1579 4 ай бұрын
i taught of doing same approach. of changing and head and swap its pointers
@shivamsays2861
@shivamsays2861 Ай бұрын
Nice videos thankyou
@pratyushtripathi1728
@pratyushtripathi1728 10 ай бұрын
Understood 😊
@oyeesharme
@oyeesharme 4 ай бұрын
thanks bhaiya for your efforts
@adebisisheriff159
@adebisisheriff159 9 ай бұрын
Thanks Striver!!!
@AkashGautam-k2u
@AkashGautam-k2u 8 ай бұрын
Thank You Bhaiya.
@tle964
@tle964 5 ай бұрын
nice video
@saitejanedunoori5451
@saitejanedunoori5451 5 ай бұрын
great work and thank you !
@DeadPoolx1712
@DeadPoolx1712 2 ай бұрын
UNDERSTOOD;
@TON-108
@TON-108 10 ай бұрын
Understood!!! Thank You.......
@chetashreejagtap7585
@chetashreejagtap7585 11 ай бұрын
thank you striver👍👍
@NazeerBashaShaik
@NazeerBashaShaik 7 ай бұрын
Understood, thank you.
@striverdaaadi
@striverdaaadi 10 ай бұрын
striver is best
@RajNamdev_19
@RajNamdev_19 3 ай бұрын
Understood ;)
@nishant4595
@nishant4595 2 ай бұрын
the best!!!!
@gourabrajak8132
@gourabrajak8132 9 ай бұрын
👍😊
@YourCodeVerse
@YourCodeVerse 10 ай бұрын
Understood✅🔥🔥
@sumitworld918
@sumitworld918 6 ай бұрын
Undertood 😌
@charuprabha9696
@charuprabha9696 4 ай бұрын
@Ergoswami
@Ergoswami 7 ай бұрын
Completed!
@artcodetravel
@artcodetravel 10 ай бұрын
If we point the head to last node, the behaviour would be same as revered doubly Linked list right??? Why do we need to do these processing???
@techwithsam4302
@techwithsam4302 4 ай бұрын
In that case we can't traverse in the forward direction instead we have to go backward to traverse!!
@khalasianiket816
@khalasianiket816 4 ай бұрын
understood ❤
@subee128
@subee128 Жыл бұрын
Thanks
@ThakurIsGeek
@ThakurIsGeek 10 ай бұрын
nice
@firebout7675
@firebout7675 8 ай бұрын
understood
@MohitKumar-o3l1u
@MohitKumar-o3l1u 5 ай бұрын
Understood !!
@abhishekprasad010
@abhishekprasad010 6 ай бұрын
Understood!
@Zomb-zj4ip
@Zomb-zj4ip 5 ай бұрын
understooooooooooooood
@rizonkumarrahi
@rizonkumarrahi Жыл бұрын
Great
@XS_01
@XS_01 4 ай бұрын
i just swapped the data values, using two pointers as head and tail.
@harshuke5831
@harshuke5831 Жыл бұрын
Understood
@r_uhi05
@r_uhi05 7 ай бұрын
understood!
@YashGaneriwal-je6rh
@YashGaneriwal-je6rh 3 ай бұрын
done
@ronakvaghela2714
@ronakvaghela2714 3 ай бұрын
@UjjwalMishra-xf9un
@UjjwalMishra-xf9un 5 ай бұрын
why this code is not working,, its all same just using one extra variable; Node* reverseDLL(Node* head) { if(head==nullptr || head->next==nullptr)return head; Node * current=head; Node *back=nullptr; Node *front=nullptr; Node *temp=nullptr; while(current){ back=current->prev; front=current->next; temp=back; back=front; front=temp; current=current->prev; } return back->prev; }
@harshitjaiswal9439
@harshitjaiswal9439 10 ай бұрын
🔥🔥🔥
@varun1017
@varun1017 10 ай бұрын
why this is correct and last=curr->prev; curr->prev=curr->next; curr->next=last; this is not working? last=curr->next; curr->next=curr->prev; curr->prev=last;
@kartikeygupta5998
@kartikeygupta5998 3 ай бұрын
can we exchange head with with tail and tail with head
@vishious14
@vishious14 9 ай бұрын
My approach looks something like this: Publlic class Solution{ public static Node reverseDLL(Node head) { Node p=null,curr=null,f=head; while(f!=null){ p = curr; curr = f; f=f.next; curr.next = p; if(p!=null) p.prev = curr; } head = curr; return head; } }
@TarunKumar-km5ps
@TarunKumar-km5ps 9 ай бұрын
👌👌👌👌👌👌👌👌👌👌👌👌
@AkashKumarTiwary-u4b
@AkashKumarTiwary-u4b 6 ай бұрын
god
@shalinikumari6050
@shalinikumari6050 Ай бұрын
understood 29 sep 2024
@himanshukaushik9223
@himanshukaushik9223 10 ай бұрын
Bhaiya 0(1) ma bhi solution hai kya iska ??
@vedikamishra009
@vedikamishra009 3 күн бұрын
traverse toh krna hee h, so no O(1)
@AyushRawat-v8m
@AyushRawat-v8m 5 ай бұрын
class Solution { public: Node* reverseDLL(Node * head) { if(head == NULL || head->next == NULL) { return head; } Node* pichli = head; while(head->next != NULL) { pichli = head; head = head -> next; } Node*mover = head; mover->next = pichli; mover->prev = NULL; Node*back = mover; mover = mover->next; pichli = pichli->prev; while(pichli != NULL) { mover->prev = back; mover->next = pichli; back = mover; mover = mover->next; pichli = pichli->prev; } mover->next = NULL; mover->prev = back; return head; } }; this is i ve done but ur one is more intutive and easy also
@Rohith__Dev
@Rohith__Dev 5 ай бұрын
28-06-2024
@harshilpatel3205
@harshilpatel3205 8 ай бұрын
Understood 🫡
@ganeshvhatkar9253
@ganeshvhatkar9253 10 ай бұрын
Understood
@chiragbansod8252
@chiragbansod8252 8 ай бұрын
understood
@pradipkumarmukhi
@pradipkumarmukhi 6 ай бұрын
Understood
@ashishpradhan6250
@ashishpradhan6250 5 ай бұрын
understood
@adityapandey23
@adityapandey23 6 ай бұрын
Understood
@himanshidafouty347
@himanshidafouty347 5 ай бұрын
Understood
@satyanarayanbarik1701
@satyanarayanbarik1701 Ай бұрын
Understood
L5. Add 2 numbers in LinkedList | Dummy Node Approach
14:48
take U forward
Рет қаралды 116 М.
L9. Reverse a LinkedList | Iterative and Recursive
32:42
take U forward
Рет қаралды 163 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 27 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 3,8 МЛН
🔥Part 2 - SA 220: Para 1-4,A1,A2 - Scope of SA I CA Inter I CA Final I Shreenidhi Borikar🔥
1:19:04
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 111 М.
L6. Odd Even Linked List | Multiple Approaches
24:05
take U forward
Рет қаралды 106 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 835 М.
L13. Find the middle element of the LinkedList | Multiple Approaches
14:37
L3. Introduction to Doubly LinkedList | Insertions and Deletions
1:04:07
take U forward
Рет қаралды 185 М.
How I Mastered Data Structures and Algorithms
10:45
Ashish Pratap Singh
Рет қаралды 260 М.