/**
* Note: The returned array must be malloced, assume caller calls free().
*/
int* smallerNumbersThanCurrent(int* nums, int numsSize, int* returnSize){
int* ans=(int*)calloc(numsSize,sizeof(int));
*returnSize=0;
for(int a=0;a<numsSize;a++){
int count=0;
for(int b=0;b<numsSize;b++){
if(nums[a]>nums[b]){
count++;
}
}
ans[*returnSize]=count;
*returnSize=*returnSize+1;
}
return ans;
}
08-19
144
09-16
668
09-16
216
02-06
310
02-25
249
11-08
247