Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-17 15:08:09
阅读次数:
93
背景话不多说,我们能否用纯css实现以下效果:答案是肯定的。借助css:placeholder-shown:valid:invalid伪类及html5inputpattern属性就可以实现,:placeholder-shown伪类目前兼容性如下:直接上代码!html:<!DOCTYPEhtml><html><head><metacharset="utf-8
分类:
Web程序 时间:
2020-01-17 10:18:59
阅读次数:
110
来源 https://leetcode cn.com/problems/longest substring without repeating characters/ 题目描述 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度。 示例?1: 输入: "abcabcbb" 输出: 3 解 ...
分类:
编程语言 时间:
2020-01-15 19:47:02
阅读次数:
82
有效的回文。题意很简单,验证给的input是否是一个有效的回文。例子, Example 1: Input: "A man, a plan, a canal: Panama" Output: true Example 2: Input: "race a car" Output: false 思路也很简 ...
分类:
其他好文 时间:
2020-01-15 09:24:11
阅读次数:
51
最长的回文子串。题意是给一个字符串,请输出其中最长的回文子串。例子 Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: "cbbd" Output: "bb" 这个 ...
分类:
其他好文 时间:
2020-01-15 09:23:40
阅读次数:
66
最长无重复字符的子串。 题意是给一个input字符串,请输出其最长的,没有重复字符的substring。这是two pointer/sliding window的基础题。例子 Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer ...
分类:
其他好文 时间:
2020-01-14 09:18:01
阅读次数:
72
将本地文件通过前端上传到服务器上 public BaseResponseSwagger resolveFile(@Valid @ApiParam(value = "file")@RequestParam(name = "file",required = true) MultipartFile fil ...
分类:
编程语言 时间:
2020-01-13 22:01:13
阅读次数:
220
题目描述:括号(小括号、中括号、大括号)的匹配 传送门:https://leetcode-cn.com/problems/valid-parentheses/ 解法:《数据结构》中作为例子引出栈的概念。用一个栈维护,从左到右扫描目标字符串,如果括号匹配,即满足三种情况: ①、s[i] == ')' ...
分类:
其他好文 时间:
2020-01-13 20:19:49
阅读次数:
95
@Valid是使用hibernate validation的时候使用 @Validated 是只用spring Validator 校验机制使用 基于方法参数的校验对基本类型的校验 例如:以下服务触发第一个参数的验证,确保其大小在8到10之间: @Service@Validatedpublic cl ...
分类:
编程语言 时间:
2020-01-13 12:39:12
阅读次数:
96
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele ...
分类:
其他好文 时间:
2020-01-12 13:42:25
阅读次数:
92