上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 63 下一页
摘要: bool func(int x){ int temp = x; while(temp){ if(temp % 10 && x % (temp % 10) == 0) temp /= 10; else return false; } return true; } int* selfDividingNu 阅读全文
posted @ 2020-09-06 15:20 温暖了寂寞 阅读(129) 评论(0) 推荐(0) 编辑
摘要: int* findErrorNums(int* nums, int numsSize, int* returnSize){ int* arr = (int*)malloc(2*sizeof(int)); int* hash = (int*)calloc(numsSize,sizeof(int)); 阅读全文
posted @ 2020-09-06 14:36 温暖了寂寞 阅读(115) 评论(0) 推荐(0) 编辑
摘要: int** shiftGrid(int** grid, int gridSize, int* gridColSize, int k, int* returnSize, int** returnColumnSizes){ int** arr = (int**)calloc(gridSize,sizeo 阅读全文
posted @ 2020-09-06 13:49 温暖了寂寞 阅读(153) 评论(0) 推荐(0) 编辑
摘要: char * shortestCompletingWord(char * licensePlate, char ** words, int wordsSize){ char* s = (char *)calloc(strlen(licensePlate),sizeof(char)); int i,j 阅读全文
posted @ 2020-09-06 11:03 温暖了寂寞 阅读(99) 评论(0) 推荐(0) 编辑
摘要: int* shortestToChar(char * S, char C, int* returnSize){ int strLength = strlen(S);//字符串长度 int *arr=(int*)malloc(sizeof(int)*strLength); int prev = -st 阅读全文
posted @ 2020-09-06 09:30 温暖了寂寞 阅读(184) 评论(0) 推荐(0) 编辑
摘要: int Mycmp(const void* a, const void* b) { return *(int*)a - *(int*)b; } int findUnsortedSubarray(int* nums, int numsSize){ int* arr = (int*)calloc(num 阅读全文
posted @ 2020-09-05 20:47 温暖了寂寞 阅读(124) 评论(0) 推荐(0) 编辑
摘要: char * restoreString(char * s, int* indices, int indicesSize){ char* RetStr = (char*)calloc(indicesSize+1, sizeof(char)); for (int i = 0; i < indicesS 阅读全文
posted @ 2020-09-05 19:58 温暖了寂寞 阅读(309) 评论(0) 推荐(0) 编辑
摘要: int* shuffle(int* nums, int numsSize, int n, int* returnSize){ int* arr = (int*)calloc(numsSize, sizeof(int)); int pst = 0; for (int i = 0; i < numsSi 阅读全文
posted @ 2020-09-05 19:42 温暖了寂寞 阅读(164) 评论(0) 推荐(0) 编辑
摘要: int smallestRangeI(int* A, int ASize, int K){ int min = A[0]; int max = A[0]; for (int i = 0; i < ASize; i++) { if (A[i] < min)min = A[i]; else if (A[ 阅读全文
posted @ 2020-09-05 19:10 温暖了寂寞 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include <stdlib.h> #include <time.h> int main() { int a; srand((unsigned)time(NULL)); //设置随机种子后 随机数会形成固定的序列 a = rand(); printf("% 阅读全文
posted @ 2020-09-05 18:52 温暖了寂寞 阅读(1434) 评论(0) 推荐(0) 编辑
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 63 下一页