Given a string s, find the length of the longest substring without repeating characters. Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc ...
分类:
其他好文 时间:
2020-11-08 17:44:10
阅读次数:
26
###题目 717. 1-bit and 2-bit Characters ###解题方法 将指针设置在第0个位置,当数组长度>1时,如果当前位置是1,就把前两个数pop掉,否则是0的话就把前1个数pop掉,遍历结束看看bits还有没有元素,有的话return True,没有就return Fals ...
分类:
其他好文 时间:
2020-11-04 19:23:49
阅读次数:
36
[root@localhost ~]# virsh undefine vhuser-test1error: Failed to undefine domain vhuser-test1error: Requested operation is not valid: cannot undefine d ...
分类:
其他好文 时间:
2020-11-04 19:04:17
阅读次数:
16
LeetCode 941 有效的山脉数组 https://leetcode-cn.com/problems/valid-mountain-array/ 根据题意可以知道,当一个数组中的最大值在数组的中间某个位置(不能在数组的左右两端)并且这个位置往左边和右边走时数组是严格递减时,该数组才是有效的山脉 ...
分类:
编程语言 时间:
2020-11-04 17:42:49
阅读次数:
19
-bash-4.1$ crontab -e Authentication token is no longer valid; new one requiredYou (oracle) are not allowed to access to (crontab) because of pam conf ...
分类:
数据库 时间:
2020-10-31 01:45:57
阅读次数:
28
如果字符串满足一下条件之一,则可以称之为 有效括号字符串(valid parentheses string,可以简写为 VPS): 字符串是一个空字符串 "",或者是一个不为 "(" 或 ")" 的单字符。字符串可以写为 AB(A 与 B 字符串连接),其中 A 和 B 都是 有效括号字符串 。字符 ...
分类:
其他好文 时间:
2020-10-24 10:23:46
阅读次数:
25
给定一棵带点权的树,求满足点权极差不超过 $d$ 的连通子图的个数。$n,d \le 2000$。 ...
分类:
其他好文 时间:
2020-10-19 22:25:22
阅读次数:
18
Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by ...
分类:
其他好文 时间:
2020-10-18 10:19:49
阅读次数:
29
1 using Newtonsoft.Json; 2 using Newtonsoft.Json.Linq; 3 4 static void Main(string[] args) 5 { 6 TestJsonValid(); 7 Console.ReadLine(); 8 } 9 10 stati ...
由于valid框架校验需要通过实体类实现,本人懒不想写那么多实体,所以捕获异常抛出与valid相同的错误提示 @Valid控制层这样写就会根据实体类的注释进行参数校验 校验框架会根据注释校验参数并给出规定好的提示如果没写 message 那么只会提示不能为空 原以为直接在控制层使用这个注释也可以实现 ...
分类:
编程语言 时间:
2020-09-17 13:18:23
阅读次数:
29