Wildcard Matching
来源:互联网 发布:淘宝代销怎么发货图解 编辑:程序博客网 时间:2024/05/29 11:10
class Solution {public: bool isMatch(const char *s, const char *p) { const char *ss=s; const char *star=NULL; while(*s!='\0') { if(*s==*p||*s=='?'||*p=='?') { s++; p++; } else if(*p=='*') { star=p++; ss=s; } else if(star) { p=star+1; s=++ss; } else return false; } while(*p=='*') p++; if(*p!='\0') return false; return true; }};word ladder 2写了好几个小时没写出来,
0 0
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Wildcard Matching
- Android开发之旅:环境搭建及HelloWorld
- PHP文件上传——纯粹使用PHP以及借助Zend框架
- vs2010+cocos2d 2.1.4配置
- 深入java虚拟机 - 垃圾收集 - 火车算法
- C指针笔记--函数中的参数指针
- Wildcard Matching
- Linux下SVN的备份与恢复
- this
- hdu4628之状态压缩dp
- Linux服务器的初步配置流程
- PHP结合Python的WEB开发技术 [ppython]
- android应用自定义字体
- 全备份、增量备份、差异备份和永久增量备份
- lcd测试