当前位置:网站首页>力扣------统计包含给定前缀的字符串
力扣------统计包含给定前缀的字符串
2022-06-30 18:28:00 【qq_37760746】
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;
}
边栏推荐
- Teach you how to write selenium test cases
- Business Intelligence BI and business management decision-making thinking 4: business cost analysis
- How to open a futures account safely? Which futures companies are more reliable now?
- Personally test the size of flutter after packaging APK, quite satisfied
- JVM常见问题
- Electron 入门
- Temperature measuring instrument based on STM32 single chip microcomputer
- 新版EasyGBS如何配置WebRTC视频流格式播放?
- Where do the guests come from
- Regular expressions (regular matching)
猜你喜欢
不同制造工艺对PCB上的焊盘的影响和要求
浏览器窗口切换激活事件 visibilitychange
Cloud Native Landing Practice Using rainbond for extension dimension information
Swin-transformer --relative positional Bias
ArcGIS no plug-in load (no offset) day map
How to seamlessly transition from traditional microservice framework to service grid ASM
一套十万级TPS的IM综合消息系统的架构实践与思考
微信小程序快速入门 --项目介绍
全技术栈、全场景、全角色云原生系列培训重磅首发,助力企业打造硬核云原生技术团队
Construction and practice of full stack code test coverage and use case discovery system
随机推荐
Trust configuring domestic sources
Four tips tell you how to use SMS to promote business sales?
RFFE中MIPI协议
Delete duplicate elements in the sorting linked list ii[unified operation of linked list nodes --dummyhead]
mysql修改数据类型_MySQL修改字段类型[通俗易懂]
DTD modeling
微信小程序快速入门 --项目介绍
Temperature measuring instrument based on STM32 single chip microcomputer
German agbb VOC hazardous substances test
阿里天池SQL训练营学习笔记5
一套十万级TPS的IM综合消息系统的架构实践与思考
com.alibaba.fastjson.JSONObject # toJSONString 消除循环引用
Sqlserver SQL Server Management Studio and transact SQL create accounts and create read-only users to access the specified database
A common mistake in enterprise model selection
Opencv data type code table dtype
详解kubernetes备份恢复利器 Velero | 深入了解Carina系列第三期
Kubernetes----Pod配置容器启动命令
Pytorch learning (III)
sql是否走索引
Kalman滤波器--从高斯融合推导