Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
Thanks for the straightforward explanation videos.
🙏🏻❤️
Subscribe
class Solution { public: Node* sortedMerge(Node* head1, Node* head2) { // code here Node* dummy = new Node(-1); Node* curr = dummy; while(head1!=NULL && head2!=NULL){ if(head1->datadata){ curr->next=head1; curr = head1; head1= head1->next; } else{ curr->next=head2; curr = head2; head2= head2->next; } } if(head1!=NULL){ curr->next = head1; } else curr->next=head2; return dummy->next; }};
Merge sort pehle se kiya tha ye wala mera ho gaya aj phir bhi apka video dekh leta hu concept revise karne k liye
Bdhiya bhai 🗿❤️
Thanks for the straightforward explanation videos.
🙏🏻❤️
Subscribe
class Solution {
public:
Node* sortedMerge(Node* head1, Node* head2) {
// code here
Node* dummy = new Node(-1);
Node* curr = dummy;
while(head1!=NULL && head2!=NULL){
if(head1->datadata){
curr->next=head1;
curr = head1;
head1= head1->next;
}
else{
curr->next=head2;
curr = head2;
head2= head2->next;
}
}
if(head1!=NULL){
curr->next = head1;
}
else
curr->next=head2;
return dummy->next;
}
};
Merge sort pehle se kiya tha ye wala mera ho gaya aj phir bhi apka video dekh leta hu concept revise karne k liye
Bdhiya bhai 🗿❤️