08 2020 档案

摘要:#include <stdio.h>#include <malloc.h>typedef struct Node{ int data; struct Node *next;}Node; void reverseNode(Node *head){ Node *cur = head->next; Nod 阅读全文
posted @ 2020-08-29 12:42 牛牛码代码 阅读(287) 评论(0) 推荐(0)
摘要:#include <stdio.h>#include <string.h>#include <stdlib.h> int ishuiwen(char *p){ int i = strlen(p); for(int j=0;j<=i/2;j++) { if(p[j] !=p[i-j-1]) { ret 阅读全文
posted @ 2020-08-17 22:14 牛牛码代码 阅读(75) 评论(0) 推荐(0)
摘要:"""给你 k 种面值的硬币,面值分别为 c1, c2 ... ck,每种硬币的数量无限,再给一个总金额 amount,问你最少需要几枚硬币凑出这个金额,如果不可能凑出,算法返回 -1 。算法的函数签名如下:"""coins = [1, 2, 5]money = 11def coin_change( 阅读全文
posted @ 2020-08-09 23:43 牛牛码代码 阅读(766) 评论(0) 推荐(0)
摘要:"""经典的数字三角形问题(简单易懂,经典动态规划)73 88 1 02 7 4 44 5 2 6 5D(r,j):"""l = [[7],[3,8], [8,1,0], [2,7,4,4],[4,5,2,6,5]]n = 5def get_max_sum(row, col): if n == ro 阅读全文
posted @ 2020-08-09 23:42 牛牛码代码 阅读(264) 评论(0) 推荐(0)
摘要:记录自己的面试题 param_data = {"a": {"a": [None, "", {}, {"x": None}]}, "b": 0}def value_is_not_empty(value): return value not in ['', None, {}, []]def empty_ 阅读全文
posted @ 2020-08-09 21:00 牛牛码代码 阅读(903) 评论(0) 推荐(0)