当前位置:网站首页>String-4-242. 有效的字母异比特詞
String-4-242. 有效的字母异比特詞
2022-06-09 23:16:00 【人工智能曾小健】
給定兩個字符串 s 和 t ,編寫一個函數來判斷 t 是否是 s 的字母异比特詞。
注意:若 s 和 t 中每個字符出現的次數都相同,則稱 s 和 t 互為字母异比特詞。
# 方法3-直接初始化計數器
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
if len(s) != len(t):
return False
return Counter(s) == Counter(t)
#初始化計數器
class Solution:
def isAnagram(self,s:str,t:str) -> bool:
if len(s) != len(t):
return False
return Counter(s) == Counter(t)边栏推荐
- I haven't seen this knowledge -- MySQL service evolution
- Repeated web1 history in Web3
- Leetcode(力扣)超高频题讲解(一)
- Getting to know websocket
- [image encryption and decryption] image encryption and decryption based on chaotic sequence combined with dwt+svd (including correlation test) including Matlab source code
- Swift GCD Notify after concurrent execution Lock barrier
- Please ask a question, Flink SQL. Do you want to specify a time point to start reading data? Can we do this?
- 原来树状数组可以这么简单?
- YUV format and RGB format
- [volume guide] mendeley document management tool tutorial
猜你喜欢

How does uni app build applets?

10 common high-frequency business scenarios that trigger IO bottlenecks

Explanation of leetcode UHF questions (III)

Im instant messaging development: Practice of offline messages and historical messages

Leetcode(力扣)超高频题讲解(三)

微机原理与接口技术习题1

Online text string batch replacement tool
![[filter] speech denoising based on time-varying Wiener filter, including Matlab source code](/img/77/de7c144ceece11cd2a799936287318.png)
[filter] speech denoising based on time-varying Wiener filter, including Matlab source code

什么是流动性质押?什么是农场质押?

leetcode547. Number of provinces (medium, find the number of connected components)
随机推荐
Another important content - Overseas cash loan product form and risk control measures
TL, how do you manage project risks?
[image denoising] image denoising based on Gaussian, mean, median and bilateral filtering, including Matlab source code
cadence SPB17.4 - allegro - use keyboard move part on grid offset by our setting
Ngnix 动态读取环境变量实现
M-arch (yateli M4) [at-start-f425 evaluation] No.05 flash
[Blue Bridge Cup training 100 questions] scratch vertigo Apple Blue Bridge Cup scratch competition special prediction programming questions collective training simulation exercises question 12
Mina中的区块证明
Know how to pay attention to the hot 25K problem, self-study software testing, and how much you need to learn to find a job?
项目实训(十五)---视频多人物识别补充
“35岁还没副业,都不好意思混职场”:摆脱死工资推荐这种副业
Experiment 1: configure static routes on FW to realize interworking
Common SQL statements
[question brushing] jumping game
致广大、尽精微,曙光问道算力服务“神经系统”
Leetcode(力扣)超高频题讲解(三)
使用sqlplus远程连接ASM实例的方式
JS uses regular expressions to verify that passwords contain numbers and letters
香橙派H3烧录Uboot,远程加载zImage,dtb,rootfs
什么是流动性质押?什么是农场质押?