会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
言思宁
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
17
下一页
2022年3月3日
mybatis动态标签
摘要: Mybatis动态标签 1. if标签 动态条件判断 <select id="findByCondition" resultType="user" parameterType="user"> select * from user where 1=1 <if test="username!=null"
阅读全文
posted @ 2022-03-03 21:23 言思宁
阅读(118)
评论(0)
推荐(0)
2022年2月21日
滑动窗口内数的和——lintcode604
摘要: 滑动串口求和 题目:滑动窗口内数的和 给你一个大小为n的整型数组和一个大小为k的滑动窗口,将滑动窗口从头移到尾,输出从开始到结束每一个时刻滑动窗口内的数的和。 示例: 输入:array = [1,2,7,8,5], k = 3 输出:[10,17,20] 解析: 1 + 2 + 7 = 10 2 +
阅读全文
posted @ 2022-02-21 11:43 言思宁
阅读(68)
评论(0)
推荐(0)
2022年2月10日
Linux文件编码问题
摘要: Linux修改文件报错 今天修改nginx的配置文件时: http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; lua_package_path "/u
阅读全文
posted @ 2022-02-10 22:01 言思宁
阅读(80)
评论(0)
推荐(0)
CentOS无法远程连接
摘要: CentOS无法远程连接 1. 查看CentOS是否能ping ping www.baidu.com 如果超时,,则可能是防火墙未关闭,关闭防火墙 systemctl stop firewalld systemctl disable firewalld 2. Windows的防火墙未关闭 查看win
阅读全文
posted @ 2022-02-10 19:32 言思宁
阅读(431)
评论(0)
推荐(0)
2022年2月9日
数组中的第K个最大元素——215
摘要: 数组中的第K个最大元素 题目:数组中的第K个最大元素 给定整数数组 nums 和整数 k,请返回数组中第 k 个最大的元素。 请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 示例: 输入: [3,2,1,5,6,4] 和 k = 2 输出: 5 示例: 输入: [
阅读全文
posted @ 2022-02-09 15:31 言思宁
阅读(27)
评论(0)
推荐(0)
2022年2月7日
归并排序
摘要: 归并排序 class Solution2 { public int[] sortArray(int[] nums) { if (nums == null || nums.length == 0) return nums; int[] temp = new int[nums.length]; merg
阅读全文
posted @ 2022-02-07 11:30 言思宁
阅读(26)
评论(0)
推荐(0)
2022年2月6日
快速排序
摘要: 快速排序 class Solution { public int[] sortArray(int[] nums) { if(nums==null || nums.length==0) return nums; quickSort(nums, 0, nums.length-1); return num
阅读全文
posted @ 2022-02-06 11:41 言思宁
阅读(39)
评论(0)
推荐(0)
两数之和——1
摘要: 两数之和 题目:两数之和 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。 你可以按任意顺序返回答案。 示例 : 输入:
阅读全文
posted @ 2022-02-06 10:53 言思宁
阅读(56)
评论(0)
推荐(0)
2022年2月5日
大数加法——NC1
摘要: 大数加法 题目:大数加法 以字符串的形式读入两个数字,编写一个函数计算它们的和,以字符串形式返回。 示例: 输入: "1","99" 返回值: "100" 说明: 1+99=100 题解:模拟 public static class Solution { public String solve(St
阅读全文
posted @ 2022-02-05 14:37 言思宁
阅读(39)
评论(0)
推荐(0)
2022年1月28日
验证回文字符串 Ⅱ——leetcode680
摘要: 验证回文字符串 Ⅱ 题目:验证回文字符串 Ⅱ 给定一个非空字符串 s,最多删除一个字符。判断是否能成为回文字符串。 示例 : 输入: s = "abca" 输出: true 解释: 你可以删除c字符。 题解 方法一:贪心 class Solution { public boolean validPa
阅读全文
posted @ 2022-01-28 10:24 言思宁
阅读(31)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
17
下一页
公告