返回顶部
摘要: T1 题目描述:给你一个字符串数组和一个字符串,统计字符串数组中有多少字符串的前缀与给定字符串相等。 思路:根据题意模拟即可 时间复杂度:\(O(\sum |s|)\) 参考代码: class Solution { public: int prefixCount(vector<string>& wo 阅读全文
posted @ 2022-02-27 12:18 cherish-lgb 阅读(39) 评论(1) 推荐(1) 编辑