码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
28. Implement strStr()
1. 问题描述 Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Tags:Two Pointers ...
分类:其他好文   时间:2016-08-07 00:49:04    阅读次数:125
WildcardMatching和Regex,通配符匹配和正则表达式匹配
WildcardMatching:通配符匹配 算法分析: 1. 二个指针i, j分别指向字符串、匹配公式。 2. 如果匹配,直接2个指针一起前进。 3. 如果匹配公式是*,在字符串中依次匹配即可。 注意记录上一次开始比较的位置 Implement wildcard pattern matching ...
分类:其他好文   时间:2016-08-06 19:12:33    阅读次数:159
leetcode5 Implement strstr() 实现strstr函数功能
Implement strstr() 实现strstr函数功能 whowhoha@outlook.com Question: Implement strstr(). Returns the index of the first occurrence of needle in haystack, or ...
分类:其他好文   时间:2016-08-06 09:58:19    阅读次数:132
leetcode3 Two Sum III – Data structure design
Question: Design and implement a TwoSum class. It should support the following operations: add and find. add(input) – Add the number input to an inter ...
分类:其他好文   时间:2016-08-06 09:50:28    阅读次数:196
Peeking Iterator
Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek()operation -- it es ...
分类:其他好文   时间:2016-08-06 09:40:50    阅读次数:140
Zigzag Iterator
Given two 1d vectors, implement an iterator to return their elements alternately. For example, given two 1d vectors: By calling next repeatedly until ...
分类:其他好文   时间:2016-08-06 07:01:09    阅读次数:121
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. 分析: 给出两个字符串,查询第二个字符串是否在第 ...
分类:其他好文   时间:2016-08-05 19:49:31    阅读次数:164
LeetCode-Flatten Nested List Iterator
Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ ...
分类:其他好文   时间:2016-08-05 13:52:42    阅读次数:92
leetcode No69. Sqrt(x)
Question: Implement int sqrt(int x). Compute and return the square root of x. 求平方根 Algorithm: 牛顿迭代法,迭代多次后,可以求出平方根。 还有一种雷神之锤3的程序代码,比C++标准库sqrt()的还快。 在这里贴出链接:点击打开链接 ,如果有大神看懂了麻烦讲...
分类:其他好文   时间:2016-08-04 11:42:28    阅读次数:165
LeetCode8 String to Integer (atoi)
题意: Implement atoi to convert a string to an integer. 分析: 就是注意各种特殊情况,边界情况的判断,见代码注释。 ...
分类:其他好文   时间:2016-08-03 23:39:44    阅读次数:180
2381条   上一页 1 ... 94 95 96 97 98 ... 239 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!