码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
LeetCode: Single Number [136]
【题目】 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? 【题意】 给定一个整数数组,其中除了一个数以外,其他数都是成对出现的,...
分类:其他好文   时间:2014-06-26 10:13:27    阅读次数:254
Wildcard Matching
题目 Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching sh...
分类:其他好文   时间:2014-06-25 19:56:35    阅读次数:275
[LeetCode]LRU Cache有个问题,求大神解答
题目:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the v...
分类:其他好文   时间:2014-06-25 14:12:42    阅读次数:214
LeetCode——Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using e...
分类:其他好文   时间:2014-06-24 23:30:08    阅读次数:278
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 possibl...
分类:其他好文   时间:2014-06-24 23:14:28    阅读次数:238
[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 value (will always be positive) of the key...
分类:其他好文   时间:2014-06-24 22:45:43    阅读次数:202
【LeetCode】Pow(x, n)
题目 Implement pow(x, n). 解答 直接用递归法: //递归法("折半"递归,不要用常规的一个个乘,效率很低) public class Solution { public double pow(double x, int n) { if(n==0) return 1; if(n==1) ...
分类:其他好文   时间:2014-06-24 21:14:37    阅读次数:199
Regular Expression Matching
题目 Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the ent...
分类:其他好文   时间:2014-06-24 18:43:56    阅读次数:224
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 value (will always be positive) of the key if ...
分类:其他好文   时间:2014-06-24 17:25:41    阅读次数:197
LeetCode——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 u...
分类:其他好文   时间:2014-06-24 15:52:58    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!