Skip to content

Fix: Reference lost bug and return types in Merge 2 Sorted Linked Lists - #616

Open
Gagansahu821 wants to merge 1 commit into
loveBabbar:mainfrom
Gagansahu821:main
Open

Fix: Reference lost bug and return types in Merge 2 Sorted Linked Lists#616
Gagansahu821 wants to merge 1 commit into
loveBabbar:mainfrom
Gagansahu821:main

Conversation

@Gagansahu821

Copy link
Copy Markdown
  • Added missing return statement inside the else block when the first list reaches its end.
  • Fixed pointer reference lost bug by saving ' next2 = curr2->next ' before updating links.
  • Corrected the return type of ' solve() ' function from ' void ' to Node*.

- Added missing return statement inside the else block when the first list reaches its end.
- Fixed pointer reference lost bug by saving ' next2 = curr2->next ' before updating links.
- Corrected the return type of ' solve() ' function from ' void ' to Node<int>*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant