码迷,mamicode.com
首页 >  
搜索关键字:lower    ( 3122个结果
most-wanted-letter
题目:我的解法: 1 def checkio(text): 2 import string 3 str = text.encode().lower() 4 adict = {} 5 for i in string.lowercase[::-1]: 6 ...
分类:其他好文   时间:2015-04-09 21:34:13    阅读次数:138
Lower Power with CPF(四)
The Flow with the cpf
分类:其他好文   时间:2015-04-09 19:40:15    阅读次数:101
Lower Power with CPF(三)
一些Lower Power Strategy
分类:其他好文   时间:2015-04-09 19:32:49    阅读次数:117
hdu3518---Boring counting(后缀数组,对后缀分组)
Problem Description 035 now faced a tough problem,his english teacher gives him a string,which consists with n lower case letter,he must figure out how many substrings appear at least twice,moreover,s...
分类:编程语言   时间:2015-04-09 15:34:55    阅读次数:213
Anagrams--LeetCode
题目: Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 思路: 判断两个字符串是否为anagram的方法可以有: 1)将每个字符串的所有字符按字典序排列,比较是否相同。 2)用Has...
分类:其他好文   时间:2015-04-08 15:02:39    阅读次数:143
大小写转换
大小写转换/** * 对关联数组中键名转换大小写处理 * @param [type] $arr 要转换的数组 * @param string $op 必须是CASE_LOWER,CASE_UPPER其中的值,忽略大小写,默认为CASE_LOWER * @return [type] 转...
分类:其他好文   时间:2015-04-08 14:37:10    阅读次数:127
Lintcode: Sort Letters by Case
Given a string which contains only letters. Sort it by lower case first and upper case second.NoteIt's not necessary to keep the original order of low...
分类:其他好文   时间:2015-04-06 10:04:22    阅读次数:225
lower_bound() 与 upper_bound()
#include #include //必须包含的头文件using namespace std;int main(){int point[10] = {1,3,7,7,9};int tmp = upper_bound(point, point + 5, 7) - point;//按从小到大,7最多能...
分类:其他好文   时间:2015-04-05 23:09:37    阅读次数:195
[LeetCode] Length of Last Word
Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, ret...
分类:其他好文   时间:2015-04-05 14:39:14    阅读次数:107
查询数组里有多少个数在[L,R]范围中(二分)
使用两次二分即可得到这个值比如现在有一个vector vec,里面存放的是有序数列。我们现在希望找出范围在[L,R]之间的数有多少个。则有cnt = upper_bound(vec.begin(),vec.end(),r) - lower_bound( vec.begin(),vec.end(),l...
分类:编程语言   时间:2015-04-05 00:53:06    阅读次数:255
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!