-
Notifications
You must be signed in to change notification settings - Fork 2
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
solution for twosum #14
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, Thank you for your PR!!
I think there are several problems as follows:
- You should format code with
clang-format
. - Solve it with
One-pass Hash Table
will be better. - Fix commit title and PR title to fix
Semantic Pull Request
check.
@@ -0,0 +1,43 @@ | |||
#include <iostream> | |||
#include <vector> | |||
#include <unordered_map> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used?
# Reverse Integer | ||
|
||
LeetCode [source](https://leetcode.com/problems/two-sum/) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a Solution with Intuition, Algorithm and Complexity Analysis like README.md.
vector<int> result = s.twoSum(nums, target); | ||
cout<<result[0]<<" "<<result[1]; | ||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last line should have a newline
character.
PING @tushar-nitave |
#4 Fixed.
View rendered src/TwoSum/README.md