摘要: class Solution { int result; public int sumNumbers(TreeNode root) { if(root == null)return 0; sumNumber(root, 0); return result; } public void sumNumb 阅读全文
posted @ 2020-05-09 20:51 贼心~不死 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 总是忘记,记录一下。==对于基本类型和引用类型==作用的效果不同1:对于基本类型比较的是值2:对于引用类型比较的是引用地址 String a = "hello"; String b = "hello"; String c = new String("hello"); System.out.print 阅读全文
posted @ 2020-05-09 19:58 贼心~不死 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Solution { public boolean wordBreak(String s, Set<String> dict) { boolean[] dp = new boolean[s.length()+1]; dp[0] = t 阅读全文
posted @ 2020-05-08 21:15 贼心~不死 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 后端项目完整代码:https://github.com/shenweiquan/jwt-demo 一:准备工作 1-1 运行环境: 后端:jdk1.8,springboot,jwt 前端:vue , elementui 1-2 创建前端和后端项目 后端项目结构: 二:重要的代码 JwtUtil pa 阅读全文
posted @ 2020-05-08 21:10 贼心~不死 阅读(751) 评论(0) 推荐(0) 编辑
摘要: 原题: class Solution { //构建前缀树 + dfs 深度遍历字符数组,然后和前缀树比较 //定义节点 static class TireNode{ //使用map 还是 数组 Map<Character,TireNode> childNode; boolean isEnd = fa 阅读全文
posted @ 2020-05-07 21:18 贼心~不死 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1 class WordDictionary { 2 //使用什么来存储单词 >字典树?? 3 4 //字典树 5 // 1 新建节点 6 static class TireNode{ 7 boolean flag ; //记录该单词是否出现 8 Map<Character, TireNode> c 阅读全文
posted @ 2020-05-07 21:11 贼心~不死 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 一:静态代理 在使用静态代理时,需要定义接口或者父类。被代理对象(目标对象)和代理对象都需要实现同一接口或者继承父类。 使用步骤: 1:定义一个接口IStudentDao 2:被代理对象(目标对象)StudentDao实现接口 3:代理对象StudentDaoProxy也需要实现接口 4:代理对象调 阅读全文
posted @ 2020-05-07 15:51 贼心~不死 阅读(175) 评论(0) 推荐(0) 编辑