```
int* twoSum(int* nums, int numsSize, int target) {
int i,j,k;
int *nums_needed = (int*)malloc(sizeof(int)*numsSize);
int *nums_needed_in = (int*)malloc(sizeof(int)*numsSize);
int* indices = (int*)malloc(sizeof(int)*2);
for(i=0,j=0;i<numsSize;i++){
for(k=0;k<j;k++){
if(nums[i]==nums_needed[k]){
indices[0] = nums_needed_in[k]+1;
indices[1] = i+1;
goto out;
}
}
nums_needed[j] = target - nums[i];
nums_needed_in[j] = i;
j++;
}
out:
return indices;
}
```