题目 1 class Solution { 2 public: 3 int sum = 0; 4 int rangeSumBST(TreeNode* root, int low, int high) { 5 dfs(root,low,high); 6 return sum; 7 } 8 void d ...
分类:
其他好文 时间:
2021-01-14 11:04:51
阅读次数:
0
流程控制 Scanner对象 使用hasNext()或者hasNextLine()判断是否有数据输入 使用next()方法或者nextLine()方法接收数据 public class Test01 { public static void main(String[] args) { //创建一个扫 ...
分类:
编程语言 时间:
2021-01-14 11:03:27
阅读次数:
0
方法 方法的重载 重载就是在一个类中有相同的函数名,但是函数的形参不同 方法的重载的规则: 方法名称必须相同 方法的形参列表必须不同(个数不同、或者类型不同、参数顺序不同) 方法的返回类型可以相同也可以不同 package method;?/** * Created by lenovo on 202 ...
分类:
编程语言 时间:
2021-01-14 11:02:57
阅读次数:
0
1.将配置信息写在appsetting.json里面 2.创建一个类,包含配置文件的属性 public class AppSettingModel { public string CC_URL { get; set; } } 3.startup里面,将配置文件和类绑定 4.使用 ...
分类:
Web程序 时间:
2021-01-14 11:01:03
阅读次数:
0
13分钟内递归一次性解出 思路如下: class Solution { public boolean isSymmetric(TreeNode root) { //注意可能为null if(root==null) {return true;} return mirrorTree(root.left, ...
分类:
其他好文 时间:
2021-01-14 10:53:52
阅读次数:
0
package com.ustb.ly; import java.util.ArrayList; import java.util.Scanner; /** * @author LinYue * @email ustb2021@126.com * @create 2021-01-12 21:07 * ...
分类:
其他好文 时间:
2021-01-14 10:42:47
阅读次数:
0
重写 public class B { public static void test(){ System.out.println("B=>test()"); } } public class A extends B { public static void test(){ System.out.p ...
分类:
编程语言 时间:
2021-01-14 10:38:57
阅读次数:
0
Java8对多个字段排序 创建User对象 public class Users { private Long id; private String name; private String code; private Long supId; private List<Users> usersLis ...
分类:
编程语言 时间:
2021-01-13 11:33:59
阅读次数:
0
#include <iostream> #include <stack> using namespace std; class GetMinStack{ public: void push(int x); void pop(); int top(); int getmin(); private: s ...
分类:
其他好文 时间:
2021-01-13 11:27:28
阅读次数:
0
package mytest; public class TestInteger { public static void main(String args[]) { Integer a =127; Integer b =127; System.out.println(a==b); a=128; b ...
分类:
其他好文 时间:
2021-01-13 11:22:55
阅读次数:
0