当前位置:网站首页>Spelling words~
Spelling words~
2022-07-24 13:24:00 【Chen San】
class Solution {
public boolean isInclude(String s,String chars){
for(int i = 0;i<s.length();i++){
String s1 = s.charAt(i)+"";
if(!chars.contains(s1)){
return false;
}
int ret = chars.indexOf(s1);
chars = chars.replaceFirst(s1,"-1");
}
return true;
}
public int countCharacters(String[] words, String chars) {
int k = 0;
for(String s : words){
boolean flg = false;
flg = isInclude(s,chars);
if(flg == true){
k+=s.length();
}
}
return k;
}
}边栏推荐
- Representation and basic application of regular expressions
- mysql select延迟的场景对应的是所有数据库查询语句都会延迟吧,我这边场景注入后,执行了一条
- 【论文阅读】Mean teachers are better role models
- Embedded problem troubleshooting methods, network problems, SD card problems, device startup problems, serial port problems, I2C problems, SPI problems, PCIe problems, etc
- Summary of embedded network problems (packet loss of network card, unrecognized network card)
- 26. Reverse linked list II
- Search engine based on boost library
- Packaging class (mutual conversion between types)
- Knowledge sharing | sharing some methods to improve the level of enterprise document management
- 关于如何提升TTL(UART)通信抗干扰——心得
猜你喜欢

如何生成预期数据?埃默里大学等最新《深度学习可控数据生成》综述,52页pdf涵盖346篇文献全面阐述可控生成技术体系

About thread (3) thread synchronization

Search engine based on boost library

Step of product switching to domestic chips, stm32f4 switching to gd32

29. Right view of binary tree

Activity start (launchactivity/startactivity)_ (1)_ WMS of flow chart

Summary of embedded network problems (packet loss of network card, unrecognized network card)

20201127 use markdown to draw UML diagrams, graphviz installation experience hematemesis finishing

Wang Ping, co-founder of Denglin Technology: Innovation + self research "dual core" drive, gpu+ enabling AI takes root | quantum bit · viewpoint sharing review

登临科技联合创始人王平:创新+自研“双核”驱动,GPU+赋能AI落地生根|量子位·视点分享回顾...
随机推荐
About the concept of thread (1)
[paper reading] mean teachers are better role models
【论文阅读】Mean teachers are better role models
The use of two-dimensional array (including the definition of two-dimensional array, the declaration and initialization of two-dimensional array (dynamic initialization, static initialization), common
如何用WebGPU流畅渲染百万级2D物体?
About thread (5) thread pool
[datasheet phy] interpretation of ksz8081 data manual
Introduction of embedded network interface scheme and summary of driver debugging methods
LEADTOOLS 22 套件 LEADTOOLS 超级套
Cmake basic grammar (1)
binary search
Chat room project
Can communication protocol (I)
Icml2022 | branch reinforcement learning
[stm32] internal independent watchdog iwdg
How to draw Bezier curve and spline curve?
How to render millions of 2D objects smoothly with webgpu?
Search engine based on boost library
爱可可AI前沿推介(7.24)
关于如何提升TTL(UART)通信抗干扰——心得