这个题只存储26个字母的,之前用的256个字符,所以可以直接用s[i]这种作为坐标,但现在只存储在26个中,坐标值是0到25,必须减去'a'才行,不减的话可能是100多的assic码 https://blog.csdn.net/fly_yr/article/details/49886391 ...
分类:
其他好文 时间:
2018-09-15 23:19:11
阅读次数:
175
题目: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 给定非空字符串s,您最多可以删除一个字符。 判断你是否可以成为回文。 E ...
分类:
其他好文 时间:
2018-09-13 10:21:34
阅读次数:
143
Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for the ...
分类:
其他好文 时间:
2018-09-12 00:00:24
阅读次数:
335
Description World-renowned Prof. A. N. Agram's current research deals with large anagram groups. He has just found a new application for his theory on ...
分类:
其他好文 时间:
2018-09-11 21:07:34
阅读次数:
150
给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。 有效字符串需满足: 注意空字符串可被认为是有效字符串。 示例 1: 示例 2: 示例 3: 示例 4: 示例 5: 当时想想好复杂啊,结果以提交报错执行时间太长,回头想想是我忽略了一些东西。由于限定条件内 ...
分类:
其他好文 时间:
2018-09-10 13:38:49
阅读次数:
232
用于模型的训练 1.说明: lightgbm.train(params, train_set, num_boost_round=100, valid_sets=None, valid_names=None, fobj=None, feval=None, init_model=None, featur ...
分类:
其他好文 时间:
2018-09-09 15:26:27
阅读次数:
1108
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. 给定一个只包含字符'(',')','{','}','[ ...
分类:
其他好文 时间:
2018-09-09 15:15:15
阅读次数:
161
Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o ...
分类:
其他好文 时间:
2018-09-09 12:05:46
阅读次数:
136
这道题主要用栈来实现的。什么是栈呢,参照书上的后缀表达式的例子谈谈自己的理解,栈最明显的特征是先进后出。所以可以有效的结合题目中 ()对匹配问题,可以把从列表中获取的符号先存到栈中。 首先建个空列表用于映射栈中元素。然后挨个查询传递过来的列表的每个元素,不在栈中就压进栈,在的话再看看是不是栈顶元素。 ...
分类:
编程语言 时间:
2018-09-09 00:44:30
阅读次数:
141
环境:SUSE SESv5版本——对应社区ceph的L版本(12.2) 故障背景:在给ceph集群扩充第四个节点的时候,运行到stage4,报错: sesadmin:~ # salt-run state.orch ceph.stage.4 openattic : valid [ERROR ] Run ...
分类:
其他好文 时间:
2018-09-06 18:19:08
阅读次数:
2311