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
阅读全文
摘要:#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
阅读全文
摘要:"""给你 k 种面值的硬币,面值分别为 c1, c2 ... ck,每种硬币的数量无限,再给一个总金额 amount,问你最少需要几枚硬币凑出这个金额,如果不可能凑出,算法返回 -1 。算法的函数签名如下:"""coins = [1, 2, 5]money = 11def coin_change(
阅读全文
摘要:"""经典的数字三角形问题(简单易懂,经典动态规划)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
阅读全文
摘要:记录自己的面试题 param_data = {"a": {"a": [None, "", {}, {"x": None}]}, "b": 0}def value_is_not_empty(value): return value not in ['', None, {}, []]def empty_
阅读全文

浙公网安备 33010602011771号