码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
LeetCode 050 Pow(x, n)
题目要求:Pow(x, n)Implement pow(x,n).代码如下:class Solution {public: //采用二分法 //时间复杂度 O(logn),空间复杂度 O(1) double pow(double x, int n) { ...
分类:其他好文   时间:2015-02-07 22:49:20    阅读次数:181
LeetCode 028 Implement strStr()
题目要求:Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.代码如...
分类:其他好文   时间:2015-02-07 17:13:25    阅读次数:117
【LeetCode从零单排】No.8 String to Integer (丧心病狂的一道题)
题目       题目很简单,就是写一个函数把string转换成int,但是通过率只有可怜的11%,难点是要考虑所有情况,特别是int溢出边界,反正我是写了2个小时还没解决,先放到这,有空接着搞,现在应该还有最后一个bug。Implement atoi to convert a string to an integer.Hint: Carefully consider all possible i...
分类:其他好文   时间:2015-02-07 11:43:19    阅读次数:147
Lintcode: Implement Queue by Stacks
As the title described, you should only use two stacks to implement a queue's actions.The queue should support push(element), pop() and top() where po...
分类:其他好文   时间:2015-02-07 08:03:40    阅读次数:143
leetcode_50_Pow(x, n)
版权所有,欢迎转载,转载请注明出处,谢谢 Pow(x, n)  Implement pow(x, n). //vs2012测试代码 //divide-and-conquer //classic #include using namespace std; class Solution { public: double pow(do...
分类:其他好文   时间:2015-02-06 21:57:41    阅读次数:180
[LeetCode]Implement strStr()
Q:Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 这道题是让我们自己完善函数strStr():返回模式串needle在主串haystack中第一次出现的索引位置,若主串中不存在模式串...
分类:其他好文   时间:2015-02-05 11:25:23    阅读次数:123
LeetCode --- 31. Next Permutation
题目链接:Next Permutation Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it a...
分类:其他好文   时间:2015-02-04 23:22:50    阅读次数:237
Localization in Ext JS
Ext JS comes bundled with a localization package that supports over 40 languages ranging from Indonesian to Macedonian, and it’s simple to implement. ...
分类:Web程序   时间:2015-02-04 21:38:51    阅读次数:135
leetcode——Next Permutation
题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest...
分类:其他好文   时间:2015-02-04 14:44:10    阅读次数:136
斯坦福大学机器学习公开课---Programming Exercise 1: Linear Regression
斯坦福大学机器学习公开课---Programming Exercise 1: Linear Regression 1  Linear regression with one variable In thispart of this exercise, you will implement linear regression with one variableto predict profi...
分类:其他好文   时间:2015-02-04 00:39:42    阅读次数:715
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!