摘要:
思路理清楚就好。 ListNode *partition(ListNode *head, int x) { // Note: The Solution object is instantiated only once and is reused by each test case. if(head==NULL) return NULL; ListNode* smallHead,*smallTail,*bigHead,*bigTail,*cur,*next; smallHead = smallTail = big... 阅读全文
摘要:
int singleNumber(int A[], int n) { // Note: The Solution object is instantiated only once and is reused by each test case. if(n cnt(32,0); int res = 0; for(int i=0;i>i)&1==1) cnt[i] = (cnt[i]+1)%3; } ... 阅读全文
摘要:
//recursive ListNode *deleteDuplicates(ListNode *head) { // Note: The Solution object is instantiated only once and is reused by each test case. if(!head||!head->next) return head; ListNode* p = head->next; if(head->val == p->val) { while(head... 阅读全文