摘要: 题目描述给定两个字符串 s 和 t,判断他们的间距是否为 1。(满足以下三个条件) 往 s 中插入一个字符得到 t从 s 中删除一个字符得到 t在 s 中替换一个字符得到 t 例1 输入: ab acb输出: true 例 2 输入: cabad输出 false 例 3 输入: 12031213 解 阅读全文
posted @ 2022-02-25 11:43 Justin_Hu 阅读(222) 评论(0) 推荐(0)
摘要: public class OJ_1415 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int sNum = num; splitNum( 阅读全文
posted @ 2022-02-24 21:44 Justin_Hu 阅读(219) 评论(0) 推荐(0)
摘要: CVS Excell乱码怎么修改 问题描述 日常办公,从网页或者其他web端下载的表格(excel格式或csv格式),打开后发现中文乱码,如下: 常规解法 百度会发现,大部分提供的方法,就是通过excel的另存为,然后选择相应的编码,操作步骤如下: (事实证明,该方法并不好用) 正确解法 Step 1:选中目标文件--右键--打开方 阅读全文
posted @ 2022-01-15 18:27 Justin_Hu 阅读(290) 评论(0) 推荐(0)
摘要: HashMap对key进行排序 public static void main (String[]args){ HashMap<String, Integer> map = new HashMap<>(); map.put("abd", 25); map.put("abe", 85); map.pu 阅读全文
posted @ 2021-12-12 23:02 Justin_Hu 阅读(719) 评论(0) 推荐(0)
摘要: 初学Hash Map总感觉它的遍历很麻烦,其实看懂后总结一下就是:集合+泛型,没啥特别的 总结一下HashMap的三种遍历方法如下: 保证一看就会>>> 1 // 对HashMap的四种遍历方法,高效算法推荐使用第三种 2 public static void sortHashMap(HashMap 阅读全文
posted @ 2021-10-29 17:00 Justin_Hu 阅读(1111) 评论(0) 推荐(0)