当前位置:网站首页>Not for 61 days. The shortest word code
Not for 61 days. The shortest word code
2022-07-29 04:16:00 【A little Ming】

class Solution {
public int minimumLengthEncoding(String[] words) {
Set<String> good = new HashSet<String>(Arrays.asList(words));
for (String word: words) {
for (int k = 1; k < word.length(); ++k) {
good.remove(word.substring(k));
}
}
int ans = 0;
for (String word: good) {
ans += word.length() + 1;
}
return ans;
}
}边栏推荐
- 请问,在sql client中,执行insert into select from job时,如何单
- LCA 板子
- 12. Priority queue and inert queue
- Cad2020 introductory learning (2021.4.13)
- 不会就坚持59天吧 替换单词
- How to query the submission number of a version
- 请问为什么我进行mysql数据update时,kafka中采集到的是先删除原纪录(op d)再新增新
- Mmdetection preliminary use
- Pointer of pointer???...
- AssertionError(“Torch not compiled with CUDA enabled“)
猜你喜欢

编译与链接

不会就坚持58天吧 实现前缀树

不会就坚持69天吧 合并区间

MPU6050

从淘宝,天猫,1688,微店,京东,苏宁,淘特等其他平台一键复制商品到拼多多平台(批量上传宝贝详情接口教程)

2021 sist summer camp experience + record post of School of information, Shanghai University of science and technology

不会就坚持68天吧 狒狒吃香蕉

不会就坚持64天吧 查找插入位置

通过js来实现一元二次方程的效果,输入a,b,c系数后可计算出x1和x2的值

Machine vision Series 2: vs DLL debugging
随机推荐
flink-sql 如何设置 sql执行超时时间
Can you really write restful API?
Common components of solder pad (2021.4.6)
请问,在sql client中,执行insert into select from job时,如何单
Pointer constant and constant pointer
Machine vision Series 1: Visual Studio 2019 dynamic link library DLL establishment
Pix2.4.8 from start to installation (2021.4.4)
Multi card training in pytorch
11.备份交换机
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
Applet: Area scrolling, pull-down refresh, pull-up load more
Deep learning training strategy -- warming up the learning rate
[kvm] create virtual machine from kickstart file
How to query the submission number of a version
Incubator course design (April 12, 2021)
从淘宝,天猫,1688,微店,京东,苏宁,淘特等其他平台一键复制商品到拼多多平台(批量上传宝贝详情接口教程)
C语言:结构体简单语法总结
Machine vision Series 2: vs DLL debugging
How to set the SQL execution timeout for flick SQL
Function pointer and callback function