随笔分类 - 算法
摘要:力扣90. 子集 II 1、C /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both 
        阅读全文
                
摘要:力扣78. 子集 1、C /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both ret
        阅读全文
                
摘要:力扣146. LRU 缓存 1、C typedef struct { int key; int val; UT_hash_handle hh; } LRUCache; LRUCache* usr = NULL; int size = 0; LRUCache* lRUCacheCreate(int c
        阅读全文
                
摘要:力扣148. 排序链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* sortList(str
        阅读全文
                
摘要:力扣142. 环形链表 II 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode *detectCyc
        阅读全文
                
摘要:力扣138. 复制带随机指针的链表 1、C /** * Definition for a Node. * struct Node { * int val; * struct Node *next; * struct Node *random; * }; */ struct hashTable{ st
        阅读全文
                
摘要:力扣147. 对链表进行插入排序 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* inserti
        阅读全文
                
摘要:力扣141. 环形链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ bool hasCycle(struct ListNode
        阅读全文
                
摘要:力扣160. 相交链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode *getIntersect
        阅读全文
                
摘要:力扣21. 合并两个有序链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* mergeTwoL
        阅读全文
                
摘要:力扣143. 重排链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ void reorderList(struct ListN
        阅读全文
                
摘要:力扣61. 旋转链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* rotateRight(s
        阅读全文
                
摘要:力扣92. 反转链表 II 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* reverseBet
        阅读全文
                
摘要:力扣206. 反转链表 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* reverseList(
        阅读全文
                
摘要:力扣83. 删除排序链表中的重复元素 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* delet
        阅读全文
                
摘要:力扣19. 删除链表的倒数第 N 个结点 1、C /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* rem
        阅读全文
                
摘要:47. 全排列 II 1、C /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both r
        阅读全文
                
摘要:力扣40. 组合总和 II 1、C void back(int* candidates, int candidatesSize, int target,int start,int *path,int *pathSize,int **result,int** returnColumnSizes,int
        阅读全文
                
摘要:力扣46.全排列 1、C /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both ret
        阅读全文
                
摘要:题目描述 输入n个整数,依次输出每个数的约数的个数 输入描述: 输入的第一行为N,即数组的个数(N<=1000) 接下来的1行包括N个整数,其中每个数的范围为(1<=Num<=1000000000) 当N=0时输入结束。 输出描述: 可能有多组输入数据,对于每组输入数据, 输出N行,其中每一行对应上
        阅读全文
                
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号