码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
Deleting comments in c or java code by awk scripts
Last night , I attended writting examination for Bai Du,There is a problem, ask us implement a state machine to deleting the comments in c,I don't k.....
分类:编程语言   时间:2014-09-27 10:43:39    阅读次数:178
[LeetCode]Pow(x, n)
Implement pow(x, n). public class Solution { public double pow(double x, int n) { if(n>0) return powInt(x,n); else return 1/powInt(x,-n); } private double powInt(double x, int n){ if...
分类:其他好文   时间:2014-09-26 20:00:48    阅读次数:112
利用MPMoviePlayerViewController实现简单的mp4播放
1、要使用MPMoviePlayerViewController首先要加入MediaPlayer.framework.2、加入如下代码:// Implement viewDidLoad to do additional setup after loading the view, typically ...
分类:其他好文   时间:2014-09-24 21:22:27    阅读次数:227
strstr匹配
有一个在给定字符串中查找子串的函数strstr,该函数从给定的字符串src中查找substr并返回一个整数,指明substr第一次出现的位置(从0开始计数),如果找不到则返回-1。 要求: 1、实现该函数。 2、为该函数设计与实现单元测试。 说明: 1、代码中不允许使用系统已有的库函数,..
分类:其他好文   时间:2014-09-24 20:16:38    阅读次数:206
Implement strStr()
Implement strStr(). Returns a pointer to the first occurrence of needle in haystack,or null if needle is not part of haystack....
分类:其他好文   时间:2014-09-24 17:52:27    阅读次数:159
用LinkedHashMap实现LRU Cache
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 value (will always be positive) of the key i...
分类:其他好文   时间:2014-09-24 10:31:06    阅读次数:251
用LinkedHashMap用实现LRU Cache
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 value (will always be positive) of the key i...
分类:其他好文   时间:2014-09-24 09:40:46    阅读次数:177
Algorithm Part I:Programming Assignment(2)
问题描述: Programming Assignment 2: Randomized Queues and Deques Write a generic data type for a deque and a randomized queue. The goal of this assignment is to implement elementary data structures ...
分类:其他好文   时间:2014-09-22 23:40:03    阅读次数:406
C系列函数原型之-StrStr(char *str,char *subStr)的实现
#include char *Mystrstr(char *str,char *subStr){ while (*str != '\0' ) { char *p = str; char *q = subStr; char *res = NULL; if (*p == *q) { res = p; while (*q != '\0' && *p == *q)...
分类:其他好文   时间:2014-09-22 13:16:42    阅读次数:216
Leetcode: LRU Cache
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 ...
分类:其他好文   时间:2014-09-21 07:23:30    阅读次数:370
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!