当前位置:网站首页>Force deduction ----- count the string containing the given prefix
Force deduction ----- count the string containing the given prefix
2022-06-30 19:31:00 【qq_ thirty-seven million seven hundred and sixty thousand seven】

int prefixCount(char ** words, int wordsSize, char * pref){
int len=strlen(pref);
int ans=0;
for(int a=0;a<wordsSize;a++){
if(strlen(words[a])>=len){
int count=0;
for(int b=0;b<len;b++){
if(words[a][b]==pref[b]){
count++;
}
}
if(count==len){
ans++;
}
}
}
return ans;
}
边栏推荐
- JS string interception method summary
- Alibaba Tianchi SQL training camp learning notes 5
- Huaxing Securities: kitex practice under the original hybrid Cloud Architecture
- nats集群部署
- 设计电商秒杀系统
- How to open a futures account safely? Which futures companies are more reliable now?
- 【DesignMode】单例模式(singleton pattern)
- Task01:初识数据库与SQL(笔记1)
- [JetsonNano] [教程] [入门系列] [一] 如何开启VNC共享
- 程序员女友给我做了一个疲劳驾驶检测
猜你喜欢
随机推荐
10 statistical methods commonly used for "dry goods" data analysis, with key application scenarios attached
DTD modeling
手机炒股开户安全嘛!?
NBI visual platform quick start tutorial (V) introduction to editor functions and operations
Introduction to Po mode "suggestions collection"
How JS correctly clears all child elements under an element
Unlimited cloud "vision" innovation | the 2022 Alibaba cloud live summit was officially launched
com. alibaba. fastjson. Jsonobject tojsonstring eliminate circular reference
项目配置了eslint,编辑器没有关闭eslint功能的情况下,eslint没有生效
ANSI/UL 94 5-V级垂直燃烧试验
Task01: getting to know database and SQL (Note 1)
Sqlserver SQL Server Management Studio and transact SQL create accounts and create read-only users to access the specified database
torch. roll
如何利用 xUnit 框架对测试用例进行维护?
Task01:初识数据库与SQL(笔记1)
熵-条件熵-联合熵-互信息-交叉熵
ros advertise 发布数据小技巧--latch配置
20220607 fell below the recommended retail price, and the GPU market is moving towards oversupply
MQ的选择(2022.5.9-5.15)
20220528【聊聊假芯片】贪便宜往往吃大亏,盘点下那些假的内存卡和固态硬盘









