Skip to content

Commit

Permalink
Merge pull request Masked-coder11#1 from RahulKRaj7/RahulKRaj7-15-03-…
Browse files Browse the repository at this point in the history
…2024-correction

Update 15.03.2024.cpp
  • Loading branch information
RahulKRaj7 authored Mar 15, 2024
2 parents 4182988 + 2cd33c3 commit 3ed82b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 15.03.2024.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ class Solution
if (head1->data < head2->data)
{
temp = head1; // picking the lower value
head1->next = mergelist(head1->next, head2);
head1->next = merge(head1->next, head2);
// recursively merging the remaining list
}
else
{
temp = head2; // picking the lower value
head2->next = mergelist(head1, head2->next);
head2->next = merge(head1, head2->next);
// recursively merging the remaining list
}
return temp;
Expand Down

0 comments on commit 3ed82b1

Please sign in to comment.