Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["...
分类:
其他好文 时间:
2016-01-02 14:20:37
阅读次数:
230
题目来源https://leetcode.com/problems/anagrams/Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "...
分类:
编程语言 时间:
2016-01-01 18:58:13
阅读次数:
213
#include<iostream>
#include<string>
usingnamespacestd;
intmain()
{
intm,i;
cin>>m;
while(m--)
{
strings;
intn=0;
cin>>s;
for(i=0;i<s.size();i++)/*可以用s.size()表示s的大小*/
{
if(s[i]>=‘0‘&&s[i]<=‘9‘..
分类:
其他好文 时间:
2015-12-31 07:27:34
阅读次数:
130
将一个字符串首字母转换为大写,其余部分转换为小写publicstaticStringswitchFirstChar(Strings){//获取首字母 Strings1=s.substring(0,1);//获取剩余部分 Strings2=s.substring(1,s.length());//将首字母转换为大写s1=s1.toUpperCase();//将其余部分转换为小写 s2=s2.toLowe..
分类:
编程语言 时间:
2015-12-30 20:04:51
阅读次数:
206
[root@wode005my.tdb_v3]#catSZ.tick_2015-1.sql|grep000557匹配到二进制文件(标准输入)[root@wode005my.tdb_v3]#stringsSZ.tick_2015-1.sql|grep‘000557‘^C[root@wode005my.tdb_v3]#^C[root@wode005my.tdb_v3]#^C[root@wode005my.tdb_v3]#
分类:
系统相关 时间:
2015-12-30 19:58:22
阅读次数:
283
Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ...
分类:
其他好文 时间:
2015-12-30 13:22:39
阅读次数:
125
java中字符串的概述1,字符串可以看作是字符数组2,同时也是常量,一旦定义就不能被改变.存储在字符串常量池中。原型:publicfinalcalssStringextendsObjectimplementsSerializable,Compareable,CharSequenceStrings="abc";等同于char[]data={‘a‘,‘b‘,‘c‘};Strings=newString("..
分类:
编程语言 时间:
2015-12-30 00:40:48
阅读次数:
195
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences...
分类:
其他好文 时间:
2015-12-28 20:10:35
阅读次数:
130
char * p = "abc"与const char *p = "abc"的区别是什么呢?第一个语句会产生问题:warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]此时我们只需要改成第二个用...
分类:
其他好文 时间:
2015-12-27 23:24:39
阅读次数:
332
复杂的软件必须有清晰合理的架构,否则无法开发和维护。MVC(Model-View-Controller)是最常见的软件架构之一,业界有着广泛应用。它本身很容易理解,但是要讲清楚,它与衍生的 MVP 和 MVVM 架构的区别就不容易了。昨天晚上,我读了《Scaling Isomorphic Javas...
分类:
Web程序 时间:
2015-12-27 14:43:00
阅读次数:
156