摘要: #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) int cmp(const void* a,const void* b){ return *(int*)a > *(int*)b; } int findRadi 阅读全文
posted @ 2020-09-26 17:07 温暖了寂寞 阅读(164) 评论(0) 推荐(0)
摘要: int heightChecker(int* heights, int heightsSize){ int hash[101]={0}; int i,j,count=0; for (i=0; i<heightsSize; i++) hash[heights[i]]++; for (i=0,j=1; 阅读全文
posted @ 2020-09-26 14:08 温暖了寂寞 阅读(147) 评论(0) 推荐(0)
摘要: int rob(int* nums, int numsSize){ if (!numsSize) return 0; if (numsSize>1 && nums[0]>nums[1]) nums[1]=nums[0]; for (int i=2; i<numsSize; i++) { if (nu 阅读全文
posted @ 2020-09-26 12:34 温暖了寂寞 阅读(166) 评论(0) 推荐(0)
摘要: int cmp(const void* a,const void* b){ return *(int*)a > *(int*)b; } int* smallerNumbersThanCurrent(int* nums, int numsSize, int* returnSize){ int hash 阅读全文
posted @ 2020-09-26 11:38 温暖了寂寞 阅读(143) 评论(0) 推荐(0)
摘要: /*C语言解法*/ int** imageSmoother(int** M, int MSize, int* MColSize, int* returnSize, int** returnColumnSizes){ int row,col,sum,count; int** arr = (int**) 阅读全文
posted @ 2020-09-26 09:58 温暖了寂寞 阅读(182) 评论(0) 推荐(0)
摘要: typedef struct { int top; int bottom; int arr[10000]; } MyQueue; /** Initialize your data structure here. */ MyQueue* myQueueCreate() { MyQueue* obj = 阅读全文
posted @ 2020-09-26 08:41 温暖了寂寞 阅读(121) 评论(0) 推荐(0)