题解 | 子串判断

子串判断

https://www.nowcoder.com/practice/917a800d4de1423394827932f4725c68

#include <vector>
class Substr {
public:
    vector<bool> chkSubStr(vector<string> p, int n, string s) {
        // write code here
        vector<bool> res(p.size(), false);
        for(int i=0;i<n;++i){
            if(s.find(p[i]) != -1){
                res[i] = true;
            }
        }
        return res;

    }
};

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务