摘要:
class Solution { public boolean isHappy(int n) { Set<Integer> set=new HashSet<Integer>(); int temp=n; set.add(temp); while(true) { temp=sum(temp); if( 阅读全文
posted @ 2019-08-07 09:03
小路不会迷路
阅读(156)
评论(0)
推荐(0)
摘要:
给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 //用的是HashMap这个数据结构,和之前的那个数组中重复元素比较类似,不用这个的话,直接用散列表来看一下效果怎么样 class Solution { public boolean isAnagram(String 阅读全文
posted @ 2019-08-07 08:04
小路不会迷路
阅读(161)
评论(0)
推荐(0)
浙公网安备 33010602011771号