https://leetcode.com/problems/implement-strstr/#/description ...
分类:
其他好文 时间:
2017-04-26 17:44:18
阅读次数:
140
【题目描述】Foragivensourcestringandatargetstring,youshouldoutputthefirstindex(from0)oftargetstringinsourcestring.Iftargetdoesnotexistinsource,justreturn-1.对于一个给定的source字符串和一个target字符串,你应该在source字符串中找出target字符串出现的第一个位置(..
分类:
其他好文 时间:
2017-04-25 21:25:32
阅读次数:
155
https://leetcode.com/problems/implement-stack-using-queues/#/description ...
分类:
其他好文 时间:
2017-04-25 00:49:02
阅读次数:
177
题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not po ...
分类:
其他好文 时间:
2017-04-25 00:40:00
阅读次数:
145
Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x. 注:这里的输入输出都是整数说明不会出现 sqrt(7)这种情况,思路一就是应用二分法进行查找。每次给出中间值,然后比对cur的平方与目标值的大小。需 ...
分类:
其他好文 时间:
2017-04-24 17:17:52
阅读次数:
201
1.strstr(字符串查找) 对于一个给定的 source 字符串和一个 target 字符串,你应该在 source 字符串中找出 target 字符串出现的第一个位置(从0开始)。如果不存在,则返回 -1 class Solution { /** * Returns a index to th ...
分类:
其他好文 时间:
2017-04-24 14:06:42
阅读次数:
220
类: 访问修饰符 修饰符 class 类名称 extends 父类名称 implement 接口名称 (访问修饰符与修饰符的位置可以互换) 访问修饰符 名称 说明 备注 public 可以被本项目的所有类访问(使用),其他项目若想使用本项目中的类,必须将本项目打包为jar包,然后加入到classpa ...
分类:
编程语言 时间:
2017-04-24 09:59:00
阅读次数:
174
题目 Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (includi ...
分类:
其他好文 时间:
2017-04-23 13:23:54
阅读次数:
170
https://leetcode.com/problems/implement-queue-using-stacks/#/description ...
分类:
其他好文 时间:
2017-04-22 10:40:23
阅读次数:
209
题目 Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding ele ...
分类:
其他好文 时间:
2017-04-22 09:27:07
阅读次数:
144