码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
[LeetCode] Two Sum III - Data structure Design
Problem Description:Design and implement a TwoSum class. It should support the following operations: add and find.add - Add the number to an internal ...
分类:其他好文   时间:2015-06-05 13:57:47    阅读次数:168
Java for LeetCode 146 LRU Cache 【HARD】
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the...
分类:编程语言   时间:2015-06-04 22:26:19    阅读次数:202
【通过操作指针,与指针做函数參数'实现字串在主串中出现的次数,然后将出现的部分依照要求进行替换 】
#include#includeint strTime(const char *str1, const char *str2, int *time){ int count = 0; char *p1 = str1; char *p2 = str2; //p1是第一次出现的位置 p1 = strstr...
分类:其他好文   时间:2015-06-04 20:48:00    阅读次数:109
LeetCode 28:Implement strStr()
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 实现函数strStr。代码如下:int strStr(char* haystack, char* needle) { size_...
分类:其他好文   时间:2015-06-04 09:53:05    阅读次数:113
随心笔记
//查找 字符 strchr()//和strstr()是同义函数。功能效用完全一样。 echo strstr( 'abc@123.com', '@'); //@123.com echo strstr('abc@123.com', '@', TRUE); //abc ...
分类:其他好文   时间:2015-06-02 14:44:26    阅读次数:101
[LeetCode-JAVA] Implement Trie (Prefix Tree)
题目:Implement a trie withinsert,search, andstartsWithmethods.// Your Trie object will be instantiated and called as such:// Trie trie = new Trie();// t...
分类:编程语言   时间:2015-06-02 10:52:09    阅读次数:150
LeetCode 137:Single Number II
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 using...
分类:其他好文   时间:2015-06-02 09:27:36    阅读次数:118
LeetCode 8:String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input case...
分类:其他好文   时间:2015-06-02 09:25:09    阅读次数:115
天题系列: Wildcard Matching
题解抄自“http://simpleandstupid.com/2014/10/26/wildcard-matching-leetcode-%E8%A7%A3%E9%A2%98%E7%AC%94%E8%AE%B0/”“Implement wildcard pattern matching with ...
分类:其他好文   时间:2015-06-02 08:02:28    阅读次数:103
Boyer-Moore: Implement strStr() --- find a needle in a haystack
https://www.youtube.com/watch?v=izMKq3epJ-QBoyer-Moore algrt 关于skip的部分很重要Implement strStr().Returns the index of the first occurrence of needle in hay...
分类:其他好文   时间:2015-06-02 06:47:02    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!