摘要: inline int partition(int* a, int l, int r) { int x = a[r], i = l - 1; for (int j = l; j < r; ++j) { if (a[j] <= x) { int t = a[++i]; a[i] = a[j], a[j] 阅读全文
posted @ 2020-12-27 22:34 温暖了寂寞 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #define min(a,b) ((a)<(b))?(a):(b) int maximalSquare(char** matrix, int matrixSize, int* matrixColSize){ int* row = (int*)calloc(*matrixColSize, sizeo 阅读全文
posted @ 2020-12-27 21:59 温暖了寂寞 阅读(85) 评论(0) 推荐(0) 编辑
摘要: void recursion(int k,int n,int* returnSize,int* ColSize,int start,int cnt,int sum,int* temp,int** arr){ if(cnt==k){ if(sum==n){ arr[(*returnSize)]=(in 阅读全文
posted @ 2020-12-27 14:30 温暖了寂寞 阅读(49) 评论(0) 推荐(0) 编辑
摘要: #define max(a,b) ((a)>(b))?(a):(b); int rob(int* nums, int numsSize){ if(numsSize==1) return *nums; int dp[2][101]={0}; dp[0][0]=nums[0]; dp[0][1]=num 阅读全文
posted @ 2020-12-27 10:19 温暖了寂寞 阅读(34) 评论(0) 推荐(0) 编辑