摘要: int* decrypt(int* code, int codeSize, int k, int* returnSize){ *returnSize = codeSize; int* arr = (int*)calloc(sizeof(int), codeSize); int i, left, ri 阅读全文
posted @ 2020-11-22 20:17 温暖了寂寞 阅读(115) 评论(0) 推荐(0) 编辑
摘要: int findShortestSubArray(int* nums, int numsSize){ int i,j,max=0,pst=0,minLen=50001; int hash[50000]={0}, startPst[50000], endPst[50000]={0}; memset(s 阅读全文
posted @ 2020-11-22 18:47 温暖了寂寞 阅读(87) 评论(0) 推荐(0) 编辑
摘要: int minDeletionSize(char ** A, int ASize){ int i,j,cnt=0; for(i=0; i<strlen(A[0]); i++){ for(j=0; j<ASize-1; j++){ if(A[j][i] > A[j+1][i]){ cnt++; bre 阅读全文
posted @ 2020-11-22 17:21 温暖了寂寞 阅读(54) 评论(0) 推荐(0) 编辑
摘要: void deleteNode(struct ListNode* node) { node->val=node->next->val; node->next=node->next->next; } 阅读全文
posted @ 2020-11-22 16:27 温暖了寂寞 阅读(89) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int hash[1000001]; } MyHashMap; /** Initialize your data structure here. */ MyHashMap* myHashMapCreate() { MyHashMap* obj=(MyHashMap* 阅读全文
posted @ 2020-11-22 12:06 温暖了寂寞 阅读(124) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int hash[1000001]; } MyHashSet; /** Initialize your data structure here. */ MyHashSet* myHashSetCreate() { MyHashSet* obj=(MyHashSet* 阅读全文
posted @ 2020-11-22 11:56 温暖了寂寞 阅读(84) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int hash[4]; } ParkingSystem; ParkingSystem* parkingSystemCreate(int big, int medium, int small) { ParkingSystem* obj=(ParkingSystem* 阅读全文
posted @ 2020-11-22 11:44 温暖了寂寞 阅读(96) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int cur; int n; char** value; } OrderedStream; OrderedStream* orderedStreamCreate(int n) { OrderedStream* obj=(OrderedStream*)calloc( 阅读全文
posted @ 2020-11-22 11:31 温暖了寂寞 阅读(118) 评论(0) 推荐(0) 编辑