914. 翻转游戏 中文English You are playing the following Flip Game with your friend: Given a string that contains only two characters: + and -, you can flip ...
分类:
其他好文 时间:
2020-03-26 01:06:15
阅读次数:
79
import time import traceback def findLen(str): counter = 0 while str[counter:]: counter += 1 return counter def is_valid_date(str_date): '''判断是否是一个有效的 ...
分类:
编程语言 时间:
2020-03-25 21:48:12
阅读次数:
283
链接:https://leetcode cn.com/problems/valid palindrome/ 算法 时间复杂度:$O(logn)$ 代码 ...
分类:
其他好文 时间:
2020-03-23 15:26:56
阅读次数:
53
3 Longest Substring Without Repeating Characters 问题描述 Given a string, find the length of the longest substring without repeating characters. Example 1 ...
分类:
其他好文 时间:
2020-03-22 19:48:22
阅读次数:
54
链接:https://leetcode-cn.com/problems/valid-palindrome/ 给定一个字符串,验证它是否是回文串,只考虑字母和数字字符,可以忽略字母的大小写。 说明:本题中,我们将空字符串定义为有效的回文串。 示例 1: 输入: "A man, a plan, a ca ...
分类:
其他好文 时间:
2020-03-20 00:50:33
阅读次数:
60
trim() 方法用于删除字符串的头尾空格。(这个方法可以判断是否输入全是空格) addNewTag(){ this.$refs["addTagForm"].validate((valid) => { if (valid) { var name = this.addTagForm.tagName.t ...
分类:
Web程序 时间:
2020-03-18 23:33:09
阅读次数:
116
【Codeforces1234D】Distinct Characters Queries 的题解 ...
分类:
其他好文 时间:
2020-03-18 23:28:27
阅读次数:
44
题目: 思路: 思路很简单,只要分别统计chars中和每个单词中字母出现的个数,chars中的字母大于等于每个单词中的字母的个数,这个单词便是good 可以利用C++中的map实现,现在记录一种更灵活更常用的方式,凡是要统计字母个数,都可以这样处理: 创建一个数组vec[26],每个位置分别存储的是 ...
分类:
其他好文 时间:
2020-03-17 22:36:19
阅读次数:
75
(第一篇博客,希望大家多多支持!还是初学者,若有问题或更好的见解请在评论区指出,欢迎交流!) 一、问题描述 Write an encryption program that reads from cin (a file)and writes the encoded characters to cou ...
分类:
编程语言 时间:
2020-03-16 23:12:59
阅读次数:
77
1.分组验证,参数太多不想一一分组 分组的类继承package javax.validation.groups 下的Default 分组验证遇到的坑 2.@Valid和@Validated的区分 @Validated是@Valid 的一次封装,是Spring提供的校验机制使用。 @Valid不提供分 ...
分类:
编程语言 时间:
2020-03-16 15:11:03
阅读次数:
223