import turtledef tree(branch_len): if branch_len > 5: #树干太短不画,即递归结束条件 t.forward(branch_len)#画树干 t.right(20) #右倾斜20度 tree(branch_len - 15) #递归调用,画右边的小树 ...
分类:
其他好文 时间:
2020-04-07 00:31:10
阅读次数:
103
链接:https://leetcode cn.com/problems/binary tree zigzag level order traversal/ ...
分类:
其他好文 时间:
2020-04-06 20:53:54
阅读次数:
53
链接:https://leetcode cn.com/problems/maximum depth of binary tree/ 递归 ...
分类:
其他好文 时间:
2020-04-06 20:24:13
阅读次数:
74
定义 trim 去除字符串里的空白符及其他指定字符 Strip whitespace (or other characters) from the beginning and end of a string 描述 参数 可指定任意字符,使用..可指定一个范围 默认去除下面五个字符 " " (ASCI ...
分类:
Web程序 时间:
2020-04-06 19:02:08
阅读次数:
93
1 // 2 // Stack.h 3 // 顺序栈 4 // 5 // Created by geshenglu on 2020/3/21. 6 // Copyright © 2020 geshenglu. All rights reserved. 7 // 8 9 #ifndef Stack_h ...
分类:
其他好文 时间:
2020-04-06 15:42:55
阅读次数:
83
StorageClass 之前我们部署了PV 和 PVC 的使用方法,但是前面的 PV 都是静态的,什么意思?就是我要使用的一个 PVC 的话就必须手动去创建一个 PV,我们也说过这种方式在很大程度上并不能满足我们的需求,比如我们有一个应用需要对存储的并发度要求比较高,而另外一个应用对读写速度又要求 ...
分类:
其他好文 时间:
2020-04-06 13:41:41
阅读次数:
69
DomTree DOM DOM是一个由javascript节点对象组成的层次结构/树 <html> <head> <title>HTML</title> </head> <body> </body> </html> 使用chrome打开,并打开开发者工具,选择Elements->Properties ...
分类:
其他好文 时间:
2020-04-06 11:29:37
阅读次数:
78
Given the node of a binary search tree, return the sum of values of all nodes with value between and (inclusive). The binary search tree is guaranteed ...
分类:
其他好文 时间:
2020-04-06 09:50:46
阅读次数:
73
1、 subst函数 格式:$(subst <from>, <to>, <text>)功能:把字串<text>中的<from>字符串替换成<to>返回:函数返回被替换过后的字符串。 示例: $(subst a,the,There is a big tree) 把“There is a big tre ...
分类:
其他好文 时间:
2020-04-06 09:36:45
阅读次数:
77
1 class Solution: 2 def hIndex(self, citations): 3 citations_len = len(citations) 4 if citations_len<=0: 5 return 0 6 low = 0 7 high = citations_len-1 ...
分类:
其他好文 时间:
2020-04-06 09:24:25
阅读次数:
69