问题在哪里呢?
public class Solution {public int[] TwoSum(int[] nums, int target) {
}
}
int twoSum(int nums, int numsSize, int target)
{
int i,j;
int result=NULL;
for(i=0;i<numsSize-1;i++)
{
for(j=i+1;j<numsSize;j++)
{
if(nums[i]+nums[j]==target)
{
result=(int*)malloc(sizeof(int)*2);
result[0]=i;
result[1]=j;
return result;
}
}
}
return result;
}