cnt1.put(str1.charAt(i),cnt1.getOrDefault(str1.charAt(i),0)+1); if(cnt1.get(str1.charAt(i))>=2) flag = true; 题目一的这段代码的作用是什么呢,为什么一定要一个字符出现两次flag才能为true呢
点赞 2

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务