当前位置:网站首页>2022.4.10-----leetcode.804
2022.4.10-----leetcode.804
2022-04-23 01:44:00 【路Lu727】
public int uniqueMorseRepresentations(String[] words) {
Set<String> set=new HashSet<>();
String[] ss={".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."};
for(String word:words){
String s="";
for(int j=0;j<word.length();j++){
int idx=word.charAt(j)-'a';
s=s+ss[idx];
}
set.add(s);
}
return set.size();
}
版权声明
本文为[路Lu727]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_60466670/article/details/124355779
边栏推荐
- CDR2022首发全新版本性能介绍
- 力扣(LeetCode)112. 路径总和(2022.04.22)
- Longest common subsequence (record path version)
- Technology cloud report: cloud computing has entered the "second half". Where is the way out for domestic cloud?
- Jerry's factors that usually affect CPU performance test results are: [article]
- 计蒜客:方程的解数
- In the context of Internet plus, how can enterprises innovate customer service?
- NR polar code 七- SCL(succesive cancellation list decoding)
- Learning methods and career development guide (2022 Edition)
- J-Link RTT使用
猜你喜欢

Abused "architect"!

Full Permutation (DFS and next_permutation solution)

Google developer tool preserve log

The sixth season of 2022, the perfect children's model IPA national race leads the yuanuniverse track

Problem solving: dpkg DEB: error: package name has characters that are't lowercase alphanums or '- +‘

Digital collection platform settled in digital collection platform to develop SaaS platform of digital collection

科技云报道:云计算进入“下半场”,国产云的出路在哪儿?

紫光国微财报一枝独秀 2021年净利润三位数增长靠什么

Level 4 city area table xlsx, SQL file, domestic, provincial, county, street, township level 4 address in China (name, linkage ID, level, end level or not (1-yes))

Do447 manage user and team access
随机推荐
W801 / w800 WiFi socket development (I) - UDP
Gbase 8s fragment table management operation
腾讯云接口进行人脸检测 和签名出错问题
最新流程引擎 flowable 6.7.2 更新说明
Garlic customer: equilateral triangle (DFS)
2022第六季完美童模 IPA国民赛领跑元宇宙赛道
The most easy to understand service container and scope of dependency injection
(product resources) mingdeyang ad8488 module high performance digital X-ray FMC interface 128 analog channel high-speed ADC chip
.NET单元测试第一篇:常见.NET单元测试框架有哪些?
What are the benefits of writing unit tests using the unit test framework?
清研环境深交所上市:年营收1.8亿 市值41亿
Introduction to PCIe xdma IP core (with list) - mingdeyang science and Education (mdy edu. Com)
计蒜客:方程的解数
电子采购如何成为供应链中的增值功能?
Counting garlic customers: Sudoku (DFS)
W801/W800-wifi-socket开发(二)-UDP蓝牙控制wifi连接
Itextsharp page setup
Instructions for Jerry's reset IO maintenance level [chapter]
Counting garlic guest: the solution of the equation
42. Use k3det in mmrotate for rotating target detection, MNN deployment and ncnn deployment