llllmz

导航

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 35 下一页

2024年3月16日

376. 摆动序列c

摘要: int max(int i,int j){ if(i>j) return i; return j; } int wiggleMaxLength(int* nums, int numsSize){ int** dp=(int**)malloc(sizeof(int*)*numsSize); for(i 阅读全文

posted @ 2024-03-16 15:40 神奇的萝卜丝 阅读(16) 评论(0) 推荐(0)

491. 非递减子序列c

摘要: /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both returned array a 阅读全文

posted @ 2024-03-16 13:38 神奇的萝卜丝 阅读(15) 评论(0) 推荐(0)

90. 子集 IIC

摘要: /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *returnColumnSizes array. * Note: Both returned array a 阅读全文

posted @ 2024-03-16 13:27 神奇的萝卜丝 阅读(20) 评论(0) 推荐(0)

2024年3月15日

面试题 01.01. 判定字符是否唯一c

摘要: \ bool isUnique(char* astr){ int temp[26]={0}; for(int i=0;i<strlen(astr);i++){ temp[astr[i]-'a']++; } for(int i=0;i<26;i++){ if(temp[i]>1) return fal 阅读全文

posted @ 2024-03-15 22:51 神奇的萝卜丝 阅读(14) 评论(0) 推荐(0)

141. 环形链表c

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ bool hasCycle(struct ListNode *head) { struct 阅读全文

posted @ 2024-03-15 22:26 神奇的萝卜丝 阅读(10) 评论(0) 推荐(0)

125. 验证回文串c

摘要: 回文串 置逆,栈,双指针。 bool judge(char c){ if(c>='a'&&c<='z') return true; if(c>='A'&&c<='Z') return true; if(c>='0'&&c<='9') return true; return false; } bool 阅读全文

posted @ 2024-03-15 22:24 神奇的萝卜丝 阅读(25) 评论(0) 推荐(0)

136. 只出现一次的数字c

摘要: int singleNumber(int* nums, int numsSize) { int t=nums[0]; for(int i=1;i<numsSize;i++) t=t^nums[i]; return t; } 结果: 阅读全文

posted @ 2024-03-15 22:06 神奇的萝卜丝 阅读(20) 评论(0) 推荐(0)

2235. 两整数相加

摘要: int sum(int num1, int num2){ return num1+num2; } 阅读全文

posted @ 2024-03-15 21:45 神奇的萝卜丝 阅读(12) 评论(0) 推荐(0)

234. 回文链表c

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* pre; bool judge(struct ListN 阅读全文

posted @ 2024-03-15 21:42 神奇的萝卜丝 阅读(12) 评论(0) 推荐(0)

389. 找不同c

摘要: char findTheDifference(char* s, char* t) { int temps[26]={0}; int tempt[26]={0}; int n1=strlen(s),n2=strlen(t); for(int i=0;i<n1;i++) temps[s[i]-'a']+ 阅读全文

posted @ 2024-03-15 21:26 神奇的萝卜丝 阅读(16) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 35 下一页