摘要: void recursion(struct TreeNode* root,int* returnSize,int* arr){ if (!root) return; arr[(*returnSize)++]=root->val; recursion(root->left,returnSize,arr 阅读全文
posted @ 2020-12-22 16:43 温暖了寂寞 阅读(58) 评论(0) 推荐(0) 编辑
摘要: void reorderList(struct ListNode* head){ struct ListNode* arr[40000]; struct ListNode* temp=(struct ListNode*)calloc(1,sizeof(struct ListNode)); int p 阅读全文
posted @ 2020-12-22 16:28 温暖了寂寞 阅读(80) 评论(0) 推荐(0) 编辑
摘要: struct ListNode* detectCycle(struct ListNode* head) { struct ListNode *slow = head, *fast = head; while (fast != NULL) { slow = slow->next; if (fast-> 阅读全文
posted @ 2020-12-22 15:17 温暖了寂寞 阅读(48) 评论(0) 推荐(0) 编辑
摘要: bool wordBreak(char * s, char ** wordDict, int wordDictSize){ int i=0, j, len=strlen(s); int stack[10000], left=0, right=0, val=0; stack[right++]=0; i 阅读全文
posted @ 2020-12-22 11:52 温暖了寂寞 阅读(101) 评论(0) 推荐(0) 编辑