#题目 #代码 #include <unordered_map> #include <vector> using namespace std; class Solution { public: vector<int> twoSum(vector<int> &nums, int target) { v ...
分类:
其他好文 时间:
2021-04-13 12:55:20
阅读次数:
0
记录一下java实现文件的上传、下载、删除的功能demo; /** * Controller */ @Slf4j @RestController @RequestMapping public class FileController { @Resource IFileService fileServ ...
分类:
编程语言 时间:
2021-04-13 12:53:13
阅读次数:
0
给你一个二叉搜索树的根节点 root ,返回 树中任意两不同节点值之间的最小差值 。 https://leetcode-cn.com/problems/minimum-distance-between-bst-nodes/ /** * Definition for a binary tree nod ...
分类:
其他好文 时间:
2021-04-13 12:43:51
阅读次数:
0
思路:遍历判断每个数的正负 class Solution { public: int arraySign(vector<int>& nums) { int ans = 1; for(auto &n : nums){ if(n == 0) return 0; ans *= (n > 0) ? 1 : ...
分类:
编程语言 时间:
2021-04-13 12:40:39
阅读次数:
0
package com.zhang.www.base.operater; public class Demo06 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符:一个数字就可以运算 int a=3; int b=a++; ...
分类:
其他好文 时间:
2021-04-13 12:33:54
阅读次数:
0
package com.zhang.www.base.operater; public class Demo05 { public static void main(String[] args) { //关系运算符返回的结果: 正确,错误 布尔值表示 //if int a=10; int b=20; ...
分类:
其他好文 时间:
2021-04-13 12:33:43
阅读次数:
0
一个java类中可以有多个class类,但是只能有一个public class。 没有名字初始化类,不用实例保存到变量中。 new Apple().eat(); new UserService() ...
分类:
其他好文 时间:
2021-04-13 12:31:17
阅读次数:
0
/** * 创建线程的方式三:实现Callable接口。 JDK 5.0新增 * * * 如何理解实现Callable接口的方式创建多线程比实现Runnable接口创建多线程方式强大? * 1. call()可以有返回值的。 * 2. call()可以抛出异常,被外面的操作捕获,获取异常的信息 * ...
分类:
编程语言 时间:
2021-04-13 12:25:08
阅读次数:
0
` /** * @Description: base64字符串转化成图片 * @Param: * @return: * @throws Exception * @author: hw * @date: 2021/4/12 15:45 */ public static boolean Generate ...
分类:
其他好文 时间:
2021-04-13 12:22:14
阅读次数:
0
package com.example.query; import java.io.Serializable; public class UserQuery implements Serializable { private Integer id; private String username; ...