- 博客(5)
- 收藏
- 关注
原创 leetcode算题记录
数据库查询第二高的薪资题目描述方法1:使用子查询找出最高的薪水,然后再找出小于该薪水的最大值就是第二高值。select max(distinct Salary) as SecondHighestSalary from Employeewhere Salary < (select max(distinct Salary)from Employee);方法二:使用 limit 和 offsetlimit n:子句表示查询结果返回的前n条数据;offset n :表示跳过x条语句;l
2021-04-24 15:31:57
61
原创 leetcode刷题记录
数据库两张表联结题目描述问题分析:表联结分为三种:本题中查询的内容一定要包含person信息,所以要选择左联结。select FirstName,LastName,City,State from Person left join Addresson Person.PersonId=Address.PersonId;...
2021-04-24 14:04:38
42
原创 leetcode刷题记录
二叉树——求数的深度二叉树的深度指的是从根节点到最远叶子节点的最长路径上的节点数。递归实现深度优先搜索(DFS)public int maxDepth(TreeNode root) { if(root==null){ return 0; } return 1+Math.max(maxDepth(root.left),maxDepth(root.right)); }...
2021-04-23 20:17:10
39
原创 spring中创建xml文件
第一次在resource中创建xml文件时发现并没有这个选项,百度了下才发现需要自己手动在模板库里加入。按照图中的顺序进行操作即可。在5中需要加入下面这段代码。然后下次就可以直接在新建里找到这种类型的文件了。<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/X
2021-04-08 19:51:48
975
原创 spring
spring框架探索创建spring项目时需要添加依赖: <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.2.13.RELEASE</version>加入上述代码后会报错标红,原因是未下载相应的资源。解决方法:点击右边竖着的maven,然后点击红色区域;右击
2021-04-08 16:48:01
49
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人