LintCode(easy)字符串查找(bug集)
来源:互联网 发布:网络摄像头直连电脑 编辑:程序博客网 时间:2024/05/16 03:15
目前思路:
当target字符串大于等于3时,先将target字符串的前三位单独列出来,与source字符串比较,只有与前三个字符匹配的才能进入下一步筛选,下一步则是将字符串全部比较完。
当target字符串过大,则将增加第一轮匹配的字符个数
首先,我看到题目中形参为char型字符串,然后查资料:
由于char型字符串没有可以截取它的字符串的函数,所以我决定将其转化成string,比如:char *p;string PP(p);即可
bug1:
bug2:
bug3:
bug4:
输入的是一个空指针,所以string a(source)语句会报错
0 0
- LintCode(easy)字符串查找(bug集)
- LintCode(easy)字符串查找
- LintCode(easy)111.爬楼梯(bug集)
- LintCode(easy)比较字符串(正确版)
- LintCode(easy)二分查找
- Lintcode—(2)字符串查找
- lintcode 字符串查找(strStr) (Java)
- LintCode 字符串查找(暴力法+KMP)
- LintCode(easy)翻转字符串
- Lintcode(3)-字符串查找
- LintCode 字符串查找
- LintCode 字符串查找
- LintCode-简单-字符串查找
- lintcode ----字符串查找
- lintcode,字符串查找
- 【LintCode】字符串查找
- LintCode 13 字符串查找
- LintCode : 字符串查找
- Jenkins 搭建及项目部署
- Parking a Document in FI using BAPI
- 47.Your database instance is functional for the past one month. The Automatic Workload Repository (A
- BigBang会前:乐视生态全球化优势明显,不足在哪?
- 推荐10 个短小却超实用的 JavaScript 代码段(http://www.jianshu.com/p/3ef822ec5a63)
- LintCode(easy)字符串查找(bug集)
- 通过Eclipse使用OpenCV Java
- NIO:Buffer 详解
- noip 2004-合唱队形-dp
- C++拷贝构造函数
- 125. Valid Palindrome
- C6000系列DSP的GPIO模块
- HDOJ 5742 (2016多校联合训练 Training Contest 2) It's All In The Mind
- opengl颜色混合