int* twoSum(int* nums, int numsSize, int target) {

int *res = (int *)malloc(sizeof(int) * 2);

res[0] = 0;

res[1] = 1;

```
if (2 == numsSize)
return res;
int maybe = numsSize * (numsSize - 1)/2;
int x = 0;
int y = 1;
for (; x < maybe;) {
for (; y < numsSize;) {
if ((nums[x] + nums[y]) == target) {
res[0] = x;
res[1] = y;
return res;
}
++y;
}
x += 1;
y = x + 1;
}
return res;
```

}