摘要:
可以用二分优化 address int missingNumber(int* nums, int numsSize){ int guiwei(int shu){ int a= nums[shu]; nums[shu] = shu; if((a>=0)&&(a<numsSize)) guiwei(a) 阅读全文
摘要:
address /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode *getIntersectionNode( 阅读全文
摘要:
address /** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ // 带着深度递归 i 阅读全文
摘要:
address 需要优化 // 时间复杂度n^2 char firstUniqChar(char* s){ int getlen(char* s){ int i = 0; while(s[i] != '\0'){ i++; } return i; } int len = getlen(s); if( 阅读全文