strstr //搜索字符串在另一字符串中的首次出现(对大小写敏感) //该函数返回字符串的其余部分(从匹配点)。如未找到则返回 falsestristr //查找字符串在另一字符串中第一次出现的位置(大小写不敏感)例:echo strstr("Hello worl...
分类:
Web程序 时间:
2014-10-08 12:17:05
阅读次数:
187
[leetcode]Implement wildcard pattern matching with support for '?' and '*'....
分类:
其他好文 时间:
2014-10-06 19:30:30
阅读次数:
192
/*
*
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-10-04 17:45:36
阅读次数:
163
/*
*
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-10-04 14:32:16
阅读次数:
211
N(n*m)的时间复杂度public class Solution {public String strStr(String haystack, String needle) { int nLen = needle.length(); int hLen = haystack.lengt...
分类:
其他好文 时间:
2014-10-03 18:20:54
阅读次数:
157
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-10-02 14:48:03
阅读次数:
261
[leetcode]Implement strStr()....
分类:
其他好文 时间:
2014-10-02 10:38:22
阅读次数:
154
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
编程语言 时间:
2014-10-01 02:29:00
阅读次数:
222
//结构示例:public struct Person{ string Name; int height; int weight}public bool overWeight(){ //implement something} 类示例: public class Test...
分类:
其他好文 时间:
2014-09-29 21:44:21
阅读次数:
167
今天在做一个按更新时间搜寻出某个目录里面的全部文件,因为自己写算法比較花费时间,干脆就用j2se提供的类Arrays提供的sort()方法,这样就比較省力。对于基本数据类型仅仅要Arrays.sort(数组)[“注:数组是声明为基本数据类型的数组,如int[]等”]对于对象类型,要implement...
分类:
其他好文 时间:
2014-09-28 21:13:45
阅读次数:
152