1.两数之和(欠敲打)

 1 /**
 2  * Note: The returned array must be malloced, assume caller calls free().
 3  */
 4 int* twoSum(int* nums, int numsSize, int target, int* returnSize){
 5     char a[2];
 6     for(int i=0;i<numsSize-1;i++){
 7         for(int j=i+1;j<numsSize;j++)
 8         {
 9             if((*num+i)+(*num+j)==target)
10                 goto end;
11         }
12     }
13     end: a[0]=i;
14     a[1]=j;
15     return a[2];
16     
17     
18 }

1.两数之和(欠敲打)

posted on 2019-07-18 21:52  BITChase  阅读(170)  评论(0编辑  收藏  举报

导航