当前位置:网站首页>242. Effective letter heteronyms
242. Effective letter heteronyms
2022-07-03 12:11:00 【zwanying】
- Effective alphabetic words
Given two strings s and t , Write a function to determine t Whether it is s Letter heteronym of .
Be careful : if s and t Each character in the has the same number of occurrences , said s and t They are mutually alphabetic words .
Ideas :
Use one 26 An array of lengths , Record the number of each character in a string .
Loop another string , Subtract one from the number of characters that appear .
Last , Each value of the array is 0. Is equal .
grammar :
// Get the position of a character in the string
String s = "abc";
char a = s.charAt(0);
integer array , By default, each element is 0.
边栏推荐
猜你喜欢
4000字超详解指针
laravel 时区问题timezone
Introduction to the implementation principle of rxjs observable filter operator
vulnhub之tomato(西红柿)
[learning notes] DP status and transfer
rxjs Observable filter Operator 的实现原理介绍
OpenGL index cache object EBO and lineweight mode
836. Merge sets (day 63) and search sets
Unity3d learning notes 5 - create sub mesh
C language improvement article (wchar_t) character type
随机推荐
AOSP ~ NTP (Network Time Protocol)
安装electron失败的解决办法
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
OpenGL shader use
Solution to the second weekly test of ACM intensive training of Hunan Institute of technology in 2022
Interview experience in summer camp of Central South University in 2022
libvirt 中体验容器
Vulnhub's cereal
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
Shardingsphere sub database and sub table < 3 >
vulnhub之narak
(构造笔记)ADT与OOP
Cacti监控Redis实现过程
regular expression
Oracle advanced (I) realize DMP by expdp impdp command
vulnhub之momentum
Xiaopeng P7 hit the guardrail and the airbag did not pop up. The official responded that the impact strength did not meet the ejection requirements
shardingSphere分库分表<3>
PHP导出word方法(一mht)
(構造筆記)從類、API、框架三個層面學習如何設計可複用軟件實體的具體技術