Skip to content

Add two numbers and return the answer in the form of reversed linked list. #5610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

AvwalKaur
Copy link

Add Two Numbers in the form of Linked List and return the answer in the form of Reversed Linked List
For eg.
If list 1: 2->4->6->null and list 2: 3->8->7->null, then the answer will be: 5->2->4->1->null
Explanation:
num1 is obtained by reversing the linked list 1 => num1=642
num2 is obtained by reversing the linked list 2 => num2=783
Therefore, the the number obtained after addition is : 642+783=1425
and hence we return the answer in the form of reversed linked list as : 5->2->4->1->null

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@siriak
Copy link
Member

siriak commented Oct 7, 2024

This is not a well-known algorithm, and so we cannot add it

@siriak siriak closed this Oct 7, 2024
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.

2 participants