当前位置:网站首页>不会就坚持60天吧 神奇的字典
不会就坚持60天吧 神奇的字典
2022-07-29 04:13:00 【一只小小明】

class MagicDictionary {
private String[] words;
public MagicDictionary() {
}
public void buildDict(String[] dictionary) {
words = dictionary;
}
public boolean search(String searchWord) {
for (String word : words) {
if (word.length() != searchWord.length()) {
continue;
}
int diff = 0;
for (int i = 0; i < word.length(); ++i) {
if (word.charAt(i) != searchWord.charAt(i)) {
++diff;
if (diff > 1) {
break;
}
}
}
if (diff == 1) {
return true;
}
}
return false;
}
}
作者:LeetCode-Solution
链接:https://leetcode.cn/problems/US1pGT/solution/shen-qi-de-zi-dian-by-leetcode-solution-uvh3/
来源:力扣(LeetCode)
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。边栏推荐
- The solution of porting stm32f103zet6 program to c8t6+c8t6 download program flash timeout
- 请问,在sql client中,执行insert into select from job时,如何单
- 对一个元素使用多种变形的方法
- Methods of using multiple deformations on an element
- Wechat applet parameter transfer
- Differences and principles of bio, NiO and AIO
- 【深度学习CPU(番外篇)——虚拟内存】
- flink-sql 如何设置 sql执行超时时间
- LCA board
- 淘宝商品详情接口(商品详情页面数据接口)
猜你喜欢

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

Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes

UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)

Summary on the thought of double pointer

Press the missing number of interview question 17.04 | | 260. the number that appears only once (including bit operation knowledge points)

HCIP BGP

AssertionError(“Torch not compiled with CUDA enabled“)

Object detection: object_ Detection API +ssd target detection model

Svg -- loading animation
![[Openstack] keystone,nova](/img/de/70b654a29a813c8fe828c4018bd4e7.png)
[Openstack] keystone,nova
随机推荐
MPU6050
pat A1041 Be Unique
Const read only variable constant
mmdetection初步使用
Data mining -- Introduction to the basis of association analysis (Part 1)
[untitled]
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
Mmdetection preliminary use
A little understanding of pointer, secondary pointer, wild pointer, pointer as function return value
Routing knowledge
The table of antd hides the pager when there is only one page
The structure pointer must be initialized, and the pointer must also be initialized
这个报错是什么鬼啊,不影响执行结果,但是在执行sql时一直报错。。。连接maxComputer是使用
AssertionError(“Torch not compiled with CUDA enabled“)
Object detection: object_ Detection API +ssd target detection model
数据库SQL语句实现数据分解的函数查询
(.*?) regular expression
Code or script to speed up the video playback of video websites
MySQL Part 3
How to set the SQL execution timeout for flick SQL