Skip to content
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

Two Sum Problem #2469

Closed
Sneha421 opened this issue Oct 4, 2021 · 7 comments
Closed

Two Sum Problem #2469

Sneha421 opened this issue Oct 4, 2021 · 7 comments
Assignees
Labels

Comments

@Sneha421
Copy link
Contributor

Sneha421 commented Oct 4, 2021

Problem Statement: Given an array and a target sum, find a pair of numbers from the array that add up to the target sum.
Assume that not more than one such pair exists in the given array.

Input: Array and a Target sum
Output: The pair that adds up to the target sum

image
There is always exactly one solution

@Sneha421
Copy link
Contributor Author

Sneha421 commented Oct 4, 2021

This problem has three ways different approaches

Two for loops --> O(n^2) time | O(1) space
HashMap --> O(n) time | O(n) space
Two pointers --> O(n) time | O(1) space

I have previously worked on all three approaches and would like to work on them yet again for this repository

@AshishG97
Copy link

please assign this issue to me

@susheel-kumar-1998
Copy link

I would like to contribute to this issue using hashmap in java.

@maleeshasilva
Copy link

can you please asign me?

@sakshi-tiwari670
Copy link

I can do this using HashMap as well as Two pointer algorithm. I would love to work on this . Please assign this to me

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 10, 2021
@github-actions
Copy link

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants