当前位置:网站首页>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;
}
}
边栏推荐
- 11.备份交换机
- Const read only variable constant
- View partition table format
- 信号处理中的反傅里叶变换(IFFT)原理
- 2021 sist summer camp experience + record post of School of information, Shanghai University of science and technology
- A little understanding of pointer, secondary pointer, wild pointer, pointer as function return value
- Class starts! See how smardaten decomposes complex business scenarios
- 不会就坚持63天吧 最大的异或
- Methods of using multiple deformations on an element
- LCA 板子
猜你喜欢
通过js来实现一元二次方程的效果,输入a,b,c系数后可计算出x1和x2的值
顺序表和链表
Machine vision Series 1: Visual Studio 2019 dynamic link library DLL establishment
不会就坚持59天吧 替换单词
Deep learning training strategy -- warming up the learning rate
Install the laser of ROS_ scan_ Problems encountered in match library (I)
Two forms of softmax cross entropy + numpy implementation
Class starts! See how smardaten decomposes complex business scenarios
How to solve the problem of store ranking?
Fu Yingna: Yuan universe is the new generation of Internet!
随机推荐
Opengauss pre check installation
Pointer variables -printf%d and%p meaning
请问,在sql client中,执行insert into select from job时,如何单
Locker 2022.1.1
C语言:联合体知识点总结
HC06 HC05 BT
What the hell is this error? It doesn't affect the execution result, but it always reports errors when executing SQL... Connecting maxcomputer uses
[kvm] install KVM
The data source is SQL server. I want to configure the incremental data of the last two days of the date field updatedate to add
不会就坚持71天吧 链表排序
C语言力扣第61题之旋转链表。双端队列与构造循环链表
Copy products with one click from Taobao, tmall, 1688, wechat, jd.com, Suning, taote and other platforms to pinduoduo platform (batch upload baby details Interface tutorial)
Machine vision Series 1: Visual Studio 2019 dynamic link library DLL establishment
不会就坚持60天吧 神奇的字典
A little understanding of pointer, secondary pointer, wild pointer, pointer as function return value
How to set the SQL execution timeout for flick SQL
BIO、NIO、AIO的区别和原理
不会就坚持59天吧 替换单词
不会就坚持68天吧 狒狒吃香蕉
Jenkins 参数化构建中 各参数介绍与示例