上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 63 下一页
摘要: /*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 温暖了寂寞 阅读(174) 评论(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 温暖了寂寞 阅读(117) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int top; int q[10000]; } MyStack; /** Initialize your data structure here. */ MyStack* myStackCreate() { MyStack* obj = (MyStack*)cal 阅读全文
posted @ 2020-09-25 19:19 温暖了寂寞 阅读(97) 评论(0) 推荐(0) 编辑
摘要: int strStr(char * haystack, char * needle){ int i,j; int hlen=strlen(haystack); int nlen=strlen(needle); if (!nlen) return 0; for (i=0; i<hlen && hlen 阅读全文
posted @ 2020-09-25 18:33 温暖了寂寞 阅读(138) 评论(0) 推荐(0) 编辑
摘要: char * sortString(char * s){ int hash[26]={0}; int len = strlen(s); int i,pst=0; for (i=0; i<len; i++) hash[s[i] - 'a']++; while(pst < len) { for (i=0 阅读全文
posted @ 2020-09-25 17:43 温暖了寂寞 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目确实很简单,构建一棵中序遍历顺序的树。中序遍历理解中序遍历,因为中序遍历顺序的每一次结果已经就是答案顺序,所以只需要在有一个空间存储当前的结果的尾节点,一一追加到结果中即可。对于中序遍历到的第一个节点,需要将当前节点直接存储为结果尾节点,最好再有一个空间存储当前节点,以便于记录最终结果的头节点。 阅读全文
posted @ 2020-09-25 17:16 温暖了寂寞 阅读(170) 评论(0) 推荐(0) 编辑
摘要: //位运算 int insertBits(int N, int M, int i, int j){ for(int start=i;start<=j;start++) N&=~((unsigned int)1<<start); //给i至j位清零 N|=(M<<i); //给i至j位插入 retur 阅读全文
posted @ 2020-09-25 11:42 温暖了寂寞 阅读(133) 评论(0) 推荐(0) 编辑
摘要: int cmp(const void* a,const void* b){ return *(int*)a > *(int*)b; } int* intersection(int* nums1, int nums1Size, int* nums2, int nums2Size, int* retur 阅读全文
posted @ 2020-09-25 10:07 温暖了寂寞 阅读(206) 评论(0) 推荐(0) 编辑
摘要: int cmp(const void* a,const void* b){ return *(int*)a > *(int*)b; } int* intersect(int* nums1, int nums1Size, int* nums2, int nums2Size, int* returnSi 阅读全文
posted @ 2020-09-25 09:29 温暖了寂寞 阅读(107) 评论(0) 推荐(0) 编辑
摘要: struct ListNode *getIntersectionNode(struct ListNode *headA, struct ListNode *headB) { if(!headA || !headB) return NULL; struct ListNode *pa = headA; 阅读全文
posted @ 2020-09-24 23:29 温暖了寂寞 阅读(79) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 63 下一页