摘要: 二维 List 自定义排序 使用lambda表达式 import java.util.*; public class Main { public static void main(String[] args) { List<List<Integer>> list = new LinkedList<> 阅读全文
posted @ 2022-08-19 14:21 dotJunz 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Java遍历Map集合简单例子 import java.util.*; public class Main { public static void main(String[] args) { HashMap<Integer, Integer> map = new HashMap<>(); map. 阅读全文
posted @ 2022-08-19 14:08 dotJunz 阅读(219) 评论(0) 推荐(0) 编辑
摘要: nSum问题模板 两数之和、三数之和、四数之和。 private List<List<Integer>> nSum(int[] nums, long target, int start, int n) { int len = nums.length; List<List<Integer>> res 阅读全文
posted @ 2022-08-19 11:19 dotJunz 阅读(261) 评论(0) 推荐(0) 编辑