码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
模拟实现strstr和strrstr
strstr函数用于判断str2是否是str1的子串,如果是,则返回str2在str1中首次出现位置的地址,如果不是则返回NULL.其模拟实现代码如下:#include<iostream> using namespace std;#include<assert.h>char* my_strstr(c ...
分类:其他好文   时间:2016-09-27 19:36:18    阅读次数:144
使用Jetty搭建Java Websocket Server,实现图像传输
https://my.oschina.net/yushulx/blog/298140 How to Implement a Java WebSocket Server for Image Transmission with Jetty 创建一个从WebSocketHandler继承的类WSHandl ...
分类:编程语言   时间:2016-09-25 07:24:21    阅读次数:330
[LintCode] 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 ...
分类:系统相关   时间:2016-09-24 10:28:55    阅读次数:189
03_线程的创建和启动_实现Runnable接口方式
【线程的创建和启动的步骤(实现Runnable接口方式)】 1.定义Runnable接口的实现类,并重写其中的run方法。run()方法的方法体是线程执行体。class SonThread implement Runnable{ public void run(){......}} 2.创建Runn ...
分类:编程语言   时间:2016-09-23 21:35:59    阅读次数:172
50. Pow(x, n)
Implement pow(x, n). ...
分类:其他好文   时间:2016-09-22 06:34:39    阅读次数:134
208. Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. ...
分类:其他好文   时间:2016-09-22 01:14:20    阅读次数:145
LeetCode69 Sqrt(x)
题意: Implement int sqrt(int x). Compute and return the square root of x.(Medium) 分析: 二分搜索套路题,不能开方开尽的时候,取结果整数位。 注意:判定条件中,用x / mid == mid而不是 mid * mid == ...
分类:其他好文   时间:2016-09-22 01:07:30    阅读次数:172
php 常用变量与函数
php 基本函数explode(" ",$str) 字符串转数组 implode(" ",$arr) 数组转字符串strrchr("I love Shanghai!","Shanghai") 查找子串最后出现的位置,返回该位置到字符串结尾的所有字符strstr("I love Shanghai!", ...
分类:Web程序   时间:2016-09-21 18:42:42    阅读次数:182
170. Two Sum III - Data structure design
Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find ...
分类:其他好文   时间:2016-09-21 14:35:19    阅读次数:115
50. Pow(x,n)
Implement pow(x, n). 看不动书了,简直已经读不进去!!还剩dp和部分hashtable median没看,有兴致再看吧。马丹书上都没有binomial heap为毛老师会讲这种很难实现的数据结构!! Solution1: 思路:递归。要注意把一半的pow存在一个变量再输出,不然复 ...
分类:其他好文   时间:2016-09-21 11:38:58    阅读次数:131
2381条   上一页 1 ... 86 87 88 89 90 ... 239 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!