description Given a positive integer N, return the number of positive integers less than or equal to N that have at least 1 repeated digit. Example In ...
分类:
其他好文 时间:
2020-06-25 14:09:06
阅读次数:
65
题目 Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute the re ...
分类:
其他好文 时间:
2020-06-25 09:37:51
阅读次数:
61
Find the Duplicate Number (M) 题目 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least ...
分类:
其他好文 时间:
2020-06-25 09:20:33
阅读次数:
64
动态规划好巧妙啊啊啊啊啊啊啊 啊 int max =Integer.MIN_VALUE; public int maxPathSum(TreeNode root) { //用动态规划来求解 //DFS //根节点的值、左子树的值、右子树的值、 dfs(root); return max; } pri ...
分类:
其他好文 时间:
2020-06-24 21:45:36
阅读次数:
59
# 导入验证器 from jsonschema import validate # 编写schema: my_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "title": "TestInfo", "descript ...
分类:
编程语言 时间:
2020-06-24 21:23:43
阅读次数:
93
Java方法分为实例方法和静态方法 实例方法 1 /*实例方法*/ 2 public final class Integer{ 3 boolean equals(Object o){ 4 ... 5 } 6 } 7 8 9 /*静态方法*/ 10 public final class Integer ...
分类:
其他好文 时间:
2020-06-24 19:53:56
阅读次数:
85
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re ...
分类:
其他好文 时间:
2020-06-24 19:28:08
阅读次数:
55
import java.util.*; /** * @Class CanVisitAllRooms * @Description 841. 钥匙和房间 * 有 N 个房间,开始时你位于 0 号房间。每个房间有不同的号码:0,1,2,...,N-1, * 并且房间里可能有一些钥匙能使你进入下一个房间。 ...
分类:
其他好文 时间:
2020-06-24 16:10:15
阅读次数:
41
1.生成实体类 2.生成JSON数据格式的方法 //存返回数据 List<Menus> totaltype = new ArrayList<>(); //使用map来装前面查到的所有数据 Map<Integer, Menus> map = new HashMap<>(); for (Menus p: ...
分类:
编程语言 时间:
2020-06-24 11:50:57
阅读次数:
95
什么是层序遍历层序遍历就是从上到下按层打印二叉树,同一层结点从左至右输出。每一层输出一行。例如这样一个二叉树:[3,9,20,null,null,15,7]返回结果为:代码实现:ArrayList<ArrayList<Integer>>Print(TreeNodepRoot){ArrayList<ArrayList<Integer>>res=newA
分类:
其他好文 时间:
2020-06-24 09:15:25
阅读次数:
55