本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744709
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
思路:
(1)如果不知道anagrams的意思,很容易将题意理解错了。最开始...
分类:
其他好文 时间:
2015-01-15 20:27:31
阅读次数:
259
Oracle Sql 中常用函数 小写字母转大写字母:upper();大写字母转小写字母:lower();字符串截取函数:substr(str,a,b);a,b为整数,str为字符串,截取字符串str从a开始的b位字符,当a为-1时从字符串右边至左开始查找,例:select substr('abcd...
分类:
数据库 时间:
2015-01-15 17:38:37
阅读次数:
278
sqlplus conn user/user --连接数据库
show user --显示当前用户
select upper(substr('liufeng',0,3) ) as firstname,lower(substr('liuyuehui',4)) as secondname from dual;--显示名字
substr('字符串',‘开始位置’,'长度');
如果开始位置为负数...
分类:
其他好文 时间:
2015-01-14 09:49:23
阅读次数:
286
select upper('testmyname') from dual; --转换为大写
select lower('testmyname') from dual; --转换为小写
select upper(substr('testmyname'),5) from dual; --截取myname,并转换为大写
selec instr('testmyname','or') from d...
分类:
数据库 时间:
2015-01-14 09:48:05
阅读次数:
149
Problem Description Now you are back,and have a task to do: Given you a string s consist of lower-case English letters only,denote f(s) as the nu...
分类:
其他好文 时间:
2015-01-12 23:44:24
阅读次数:
272
FreeMarker还提供了一些内建函数来转换输出,可以在任何变量后紧跟?,?后紧跟内建函数,就可以通过内建函数来轮换输出变量.下面是常用的内建的字符串函数: html:对字符串进行HTML编码 cap_first:使字符串第一个字母大写 lower_case:将字符串转换成小写 upper_cas...
分类:
其他好文 时间:
2015-01-12 17:22:44
阅读次数:
215
1. LEN功能:计算字符串的个数,不包含尾部的空格例子 select LEN('companyname')2 LEFT RIGHT功能: left为左取字串函数格式 left (列名,个数) right 同理3。lower upper : 大小写4.时间日期函数DATEADD 功能 : 在向指定日...
分类:
数据库 时间:
2015-01-12 16:04:36
阅读次数:
188
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, return 0.
Note: A word is...
分类:
其他好文 时间:
2015-01-12 13:03:03
阅读次数:
136
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
先将原字符串数组中的字符串单独排序,如:bac-->abc,然后对整个的数组排序,此时数组中相邻的字符串如果相等,则原数组中的两字符串必满足条件,将其加入到结...
分类:
其他好文 时间:
2015-01-12 11:37:18
阅读次数:
200
-- 查询 字符串类型值declareCURSOR cur_query IS select a.table_name, a.column_name, a.data_type from user_tab_columns a where 1=1 and (lower(a...
分类:
数据库 时间:
2015-01-09 17:05:51
阅读次数:
368