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.
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
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
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;
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;
This simple problem is insanely hard to me...thank you Striver!!
this type of great content cannot be found elsewhere , Excellent!!!
Is kunal kushwaha better or this one?
@@AlwaysOntopoftheworldI think Striver, Kunal is more into Controversies
17:21 "And the interviewer will hire you,no worry" best part🤑🤑🥰🥰
😂
instead of using next ad back which is a bit ambiguous you could've used next and previous ( prev ) which will be more understandable
🤓
Great thought of using the stacks!!!!
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.
Bro how do u approach DSA, do u first watch videos and then solve it on ur own or how?
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
@@vaibhavvm4147 video dekh le bhai, dimag khol......., phir related ques khud try kar
It really helps me to understand in a very easy manner.
Thanks a lot bhaiya.
you are the boss .. please make a playlist about competitive programming.
Thank you sir this amazing lecture 🥰
Loved your dedication sir, completed this ques and loving this series like all others. Top-tier content🔥🔥
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
The takeuforward website is not loading .. I'm trying to access the A2Z sheet for the last three days but it is not working.
i taught of doing same approach. of changing and head and swap its pointers
Thank you for this amazing playlist bhaiya ❤❤
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
Dude your lectures are amazing
Understood ;)
UNDERSTOOD;
thanks bhaiya for your efforts
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;
yup thats what i did , made it much simple to understand you have to return temp->prev
the best!!!!
Understood 😊
Understood, thank you.
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???
In that case we can't traverse in the forward direction instead we have to go backward to traverse!!
Thank You Bhaiya.
Understood!!!
Thank You.......
thank you striver👍👍
nice video
i just swapped the data values, using two pointers as head and tail.
Completed!
understood ❤
Understood
Understood✅🔥🔥
Understood !!
can we exchange head with with tail and tail with head
👍😊
done
understood
striver is best
understood!
Great
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;
🔥🔥🔥
Bhaiya 0(1) ma bhi solution hai kya iska ??
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
👌👌👌👌👌👌👌👌👌👌👌👌
28-06-2024
god
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;
}
}
Understood 🫡
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;
}
Understood
understood
Understood
17:20 , dream come true!!!
lecture 4 done,love u bhaiya
great work and thank you !
understooooooooooooood
understood
Thanks Striver!!!
Understood!
Undertood 😌
Understood
Understood
nice
Thanks