摘要:
/** * Note: The returned array must be malloced, assume caller calls free(). */ int* constructRectangle(int area, int* returnSize){ int* arr = (int*)c 阅读全文
posted @ 2020-11-26 20:19
温暖了寂寞
阅读(55)
评论(0)
推荐(0)
摘要:
//结构体存放数组元素的下标和值,接着快排,最后再逐个比较 typedef struct { int index; int val; }st; int cmp(const void* a, const void* b){ return ((*(st*)a).val != (*(st*)b).val) 阅读全文
posted @ 2020-11-26 16:57
温暖了寂寞
阅读(93)
评论(0)
推荐(0)
摘要:
int countLargestGroup(int n){ int hash[37]={0}; int map[10001]={0}; int i, sum, tmp, max=0, cnt=0; for(i=1; i<=n; i++){ map[i]=map[i/10]+i%10; hash[ma 阅读全文
posted @ 2020-11-26 12:41
温暖了寂寞
阅读(126)
评论(0)
推荐(0)

浙公网安备 33010602011771号