llllmz

导航

上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页

2024年3月21日

234. 回文链表c

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

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

66. 加一c

摘要: /** * Note: The returned array must be malloced, assume caller calls free(). */ void reverse(int* s,int n){ int head=0,tail=n-1; while(head<=tail){ in 阅读全文

posted @ 2024-03-21 20:24 神奇的萝卜丝 阅读(9) 评论(0) 推荐(0)

67. 二进制求和c

摘要: int max(int i,int j){ if(i>j) return i; return j; } void reverse(char* s,int head,int tail){ while(head<=tail){ char c=s[head]; s[head]=s[tail]; s[tai 阅读全文

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

14. 最长公共前缀c

摘要: bool judge(char* s1,char* s2,int n){ for(int i=0;i<n;i++){ if(s1[i]!=s2[i]) return false; } return true; } char* longestCommonPrefix(char** strs, int 阅读全文

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

121. 买卖股票的最佳时机c

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

posted @ 2024-03-21 19:41 神奇的萝卜丝 阅读(5) 评论(0) 推荐(0)

131. 分割回文串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-21 19:30 神奇的萝卜丝 阅读(9) 评论(0) 推荐(0)

40. 组合总和 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-21 19:01 神奇的萝卜丝 阅读(8) 评论(0) 推荐(0)

39. 组合总和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-21 18:58 神奇的萝卜丝 阅读(5) 评论(0) 推荐(0)

17. 电话号码的字母组合c

摘要: /** * Note: The returned array must be malloced, assume caller calls free(). */ char temp[10]; char c[10][5]={" "," ","abc","def","ghi","jkl","mno","p 阅读全文

posted @ 2024-03-21 18:38 神奇的萝卜丝 阅读(31) 评论(0) 推荐(0)

77. 组合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-21 17:39 神奇的萝卜丝 阅读(5) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页