We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 347f42a commit d421998Copy full SHA for d421998
TwoSum/TwoSum.cpp
@@ -1,4 +1,3 @@
1
-
2
bool lessthan(const pair<int, int>& lhs, const pair<int, int>& rhs) {
3
if (lhs.first == rhs.first)
4
return lhs.second < rhs.second;
@@ -10,6 +9,7 @@ class Solution {
10
9
vector<int> twoSum(vector<int> &numbers, int target) {
11
// Start typing your C/C++ solution below
12
// DO NOT write int main() function
+
13
vector<pair<int, int>> vnum;
14
for (size_t i = 0; i < numbers.size(); i++) {
15
vnum.push_back(make_pair(numbers[i], i + 1));
@@ -30,4 +30,4 @@ class Solution {
30
}
31
return ans;
32
33
-};
+};
0 commit comments