Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-03-12 09:53:25
阅读次数:
54
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct ...
分类:
其他好文 时间:
2020-03-11 12:41:31
阅读次数:
74
将一个矩阵(二维数组)按对角线向右进行打印。(搜了一下发现好像是美团某次面试要求半小时手撕的题)Example:Input:[[1,2,3,4],[5,1,2,3],[9,5,1,2]]Output:[[4],[3, 3],[2, 2, 2],[1, 1, 1],[5, 5],[9]] class ...
分类:
编程语言 时间:
2020-03-11 11:10:20
阅读次数:
128
1. 定义 使用 中介者模式 来集中相关对象之间复杂的沟通和控制方式。 2. 类图 3. Example 4. 使用 MVC中的C 机场调度中心 https://www.jianshu.com/p/4b57ed461a54 中提到的数据同步的问题倒是挺不错的 5.其他 中介者的优点: 1. 通过将对 ...
分类:
其他好文 时间:
2020-03-11 01:14:15
阅读次数:
53
链接:https://www.cnblogs.com/xianfeng-zhang/p/8134269.html 1,activity代码: package com.example.fitness_app.web.teacher; import android.support.v7.app.AppC ...
分类:
移动开发 时间:
2020-03-10 21:47:28
阅读次数:
89
# EXAMPLE_NUM01for i in range(10): print("loop ", i)# i 是一个 临时变量 从 0 开始循环# range 相当于 变量的一组数据# EXAMPLE_NUM02age_of_oldboy = 56for i in range(3): guess_ ...
分类:
其他好文 时间:
2020-03-10 20:06:48
阅读次数:
101
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 ...
分类:
其他好文 时间:
2020-03-10 19:55:11
阅读次数:
54
# EXAMPLE_NUM01for i in range(0, 10, 2): print("loop ", i)# i 是一个 临时变量 从 0 开始循环# range 相当于 变量的一组数据# EXAMPLE_NUM02for i in range(0, 10, 3): # 3 代表步长 pr ...
分类:
其他好文 时间:
2020-03-10 19:51:10
阅读次数:
50
# EXAMPLE_NUM01age_of_oldboy = 56count = 0while count < 3: guess_age = int(input("guess age: ")) if guess_age == age_of_oldboy: print("yes,you got it" ...
分类:
其他好文 时间:
2020-03-10 18:42:13
阅读次数:
67
django-guardian (1.1.1+) - Object level permissions support. Home - Django REST framework https://www.django-rest-framework.org/#example ...
分类:
其他好文 时间:
2020-03-10 14:14:51
阅读次数:
41