码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
【算法】字符串左移函数的O(n)解法
例如,字符串 abcdef ,若要让def翻转到abc的前头,只要按照下述3个步骤操作即可: 首先将原字符串分为两个部分,即X:abc,Y:def; 将X反转,X->X^T,即得:abc->cba;将Y反转,Y->Y^T,即得:def->fed。 反转上述步骤得到的结果字符串X^TY^T,即反转字符串cbafed的两部分(cba和fed)给予反转,cbafed得到defabc,形式化表示为...
分类:编程语言   时间:2015-04-13 14:45:04    阅读次数:192
Lua正则表达式(string函数)
下面的表列出了Lua支持的所有字符类:     .          任意字符 %a         字母 %c         控制字符 %d         数字 %l          小写字母 %p         标点字符 %s         空白符 %u        大写字母 %w        字母和数字 %x        十六进制数字 %z...
分类:其他好文   时间:2015-04-13 14:41:26    阅读次数:632
redis数据类型-strings
redis提供五种数据类型:string,hash,list,set及zset(sortedset)。1.String(字符串)string是最简单的类型,你可以理解成与Memcached一模一样的类型,一个key对应一个value,其上支持的操作与Memcached的操作类似。但它的功能更丰富。redis采用结构sdshdr和sds封装了字符串..
分类:其他好文   时间:2015-04-13 13:00:49    阅读次数:248
java记录
byte[]数组如何转换成String public static final String arrayToString(byte[] bytes) { StringBuffer buff = new StringBuffer(); for (int i = ...
分类:编程语言   时间:2015-04-13 12:37:47    阅读次数:125
php常用方法总结
/** * created by Tina * time 2015-1-6 10:31 * textarea中传入字符串的处理,返回数组,传入的字符串以换行分割; * 拆分,压缩空格,去除空值,去重复值 * @params string express_no_str * @return array ...
分类:Web程序   时间:2015-04-13 12:30:17    阅读次数:121
hihocoder(1049) 后序遍历
常见题了,分治思想,有一个结论划分后,将序列划分为更小的子集,继续应用该结论。图简单,直接递归了,之前看过非递归的写法。。。忘了Impl: 1 #include 2 #include 3 4 using namespace std; 5 6 void postOrder(string str...
分类:其他好文   时间:2015-04-13 12:26:41    阅读次数:255
PHP常用字符串函数整理 v1.0
---恢复内容开始---1、操作字符串函数//定义变量$en='Hello World';strlen() 获取字符串的长度(字节的长度)var_dump(strlen($en));substr()字符串截取,从指定字符串的指定起始位置开始,截取指定长度的字符串string substr(指定字符串...
分类:Web程序   时间:2015-04-13 12:25:41    阅读次数:235
SDUT 3185 Lexicography(排列问题(不会))
Lexicography Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 An anagram of a string is any string that can be formed using the same letters as the original. (We consi...
分类:其他好文   时间:2015-04-13 11:02:49    阅读次数:115
Reverse Words in a String--LeetCode
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C programmers: Try to solve it in-place in O(1...
分类:其他好文   时间:2015-04-13 11:01:46    阅读次数:141
ActionBarUtil:快速添加标题
ActionBarUtil用来给继承ActionBarActivity的Activity快速添加标题的工具类 工具类: public class ActionBarUtil { private static final String TAG = "ActionBarUtil"; /** * 初始化ActionBar * * @par...
分类:其他好文   时间:2015-04-13 10:58:21    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!