子串判斷-----牛客

/**
 * Author: lisiyu
 * Created: 2020/3/24
 */
public class Substr {
    public boolean[] chkSubStr(String[] p, int n, String s) {
        boolean[] booleans = new boolean[n];
        for (int i = 0; i < n; i++) {
            booleans[i] = s.contains(p[i]);
        }
        return booleans;
    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章