问题: 给定一棵二叉树。 求给定节点target开始,距离K的所有节点。 Example 1: Input: root = [3,5,1,6,2,0,8,null,null,7,4], target = 5, K = 2 Output: [7,4,1] Explanation: The nodes ...
分类:
其他好文 时间:
2021-03-09 13:09:46
阅读次数:
0
练习71: 题目: 编写input()和output()函数输入,输出5个学生的数据记录。 程序: N = 5 # stu # num : string # name : string # score[4]: list student = [] for i in range(5): student. ...
分类:
编程语言 时间:
2021-03-06 14:13:52
阅读次数:
0
问题: 给定编号为0~numCourses-1 的课程,以及课程的依赖关系prerequisites 其中prerequisites[i] = [ai, bi],ai之前必须先上了bi的课程。 bi->ai 若能够上完所有的课程,给出一个上课顺序。 否则,返回空数组。 Example 1: Inpu ...
分类:
其他好文 时间:
2021-03-01 13:28:27
阅读次数:
0
[root@zhaodong zhaodong]# iptables -I INPUT -s 192.168.10.0/24 -p tcp --dport 22 -j ACCEPT [root@zhaodong zhaodong]# iptables -A INPUT -p tcp --dport ...
分类:
系统相关 时间:
2021-03-01 13:25:10
阅读次数:
0
一、流程控制 while循环:只要条件满足一直循环 read -p "请输入一个数字:" white_data while [ ${white_data} -lt 20 ] do echo ${white_data} white_data=$((white_data + 1)) done until ...
分类:
系统相关 时间:
2021-02-27 13:22:57
阅读次数:
0
首先本人还没有学习过rabbitmq,还不太知道其exchange和queue的存储和消费的机制。下面是个人的理解,日后要是学习了rabbitmq再来更正 springcloud-stream目前案例是使用rabbitmq作为支持,现在默认的destination是topic形式,不同的微服务实例会 ...
分类:
编程语言 时间:
2021-02-27 13:17:37
阅读次数:
0
质数:大于1的自然数中,除了1和它本身以外不再有其他因数的自然数 因数:指整数a除以整数b(b≠0) 的商正好是整数而没有余数,我们就说b是a的因数。 num = int(input("输入一个数字: ")) if num > 1: # for i in range(2, num ): 这是我一开始 ...
分类:
编程语言 时间:
2021-02-26 13:31:27
阅读次数:
0
托普利茨矩阵 给你一个 m x n 的矩阵 matrix 。如果这个矩阵是托普利茨矩阵,返回 true ;否则,返回 false 。 如果矩阵上每一条由左上到右下的对角线上的元素都相同,那么这个矩阵是托普利茨矩阵 。 示例1 输入:matrix = [[1,2,3,4],[5,1,2,3],[9,5 ...
分类:
其他好文 时间:
2021-02-23 14:07:50
阅读次数:
0
<input type="button" value="禁用文本框" id="btn"/> <input type="text" value="" id="txt"/> <script src="common.js"></script> <script> //点击按钮禁用这个文本框 document ...
分类:
Web程序 时间:
2021-02-22 12:07:15
阅读次数:
0
1、 aaa = "123" answer = input("please input the answer:") while True: if answer == aaa: break answer = input("please input the answer,again:") print(" ...
分类:
编程语言 时间:
2021-02-18 13:38:19
阅读次数:
0