摘要: import java.util.Collections; import java.util.LinkedList; import java.util.Scanner; public class Demo { public static void main(String[] args) { /* 5 阅读全文
posted @ 2025-05-02 13:35 破忒头头 阅读(23) 评论(0) 推荐(0)
摘要: import java.sql.Array; import java.util.*; public class Demo { public static void main(String[] args) { /* input: 4 1 2 3 4 1 1 output: 1 input: 4 1 1 阅读全文
posted @ 2025-05-01 18:23 破忒头头 阅读(10) 评论(0) 推荐(0)
摘要: 思路:遍历目录树结构 DFS递归 import java.sql.Array; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public c 阅读全文
posted @ 2025-04-25 15:08 破忒头头 阅读(13) 评论(0) 推荐(0)
摘要: LeetCode42变体 在原题的基础上找出最大的一个坑的蓄水量 import java.util.Scanner; public class Demo { public static void main(String[] args) { /* 1 8 6 2 5 4 8 3 7 100 1 100 阅读全文
posted @ 2025-04-23 11:13 破忒头头 阅读(16) 评论(0) 推荐(0)
摘要: import java.util.Scanner; import java.util.*; import java.util.HashMap; public class Demo { public static void main(String[] args) { /* 5,8,11,3,6,8,8 阅读全文
posted @ 2025-04-23 09:46 破忒头头 阅读(11) 评论(0) 推荐(0)
摘要: import java.util.*; /** * @author Pickle * @since 2025/4/22 18:54 */ public class Demo { public static void main(String[] args) { Scanner scanner = ne 阅读全文
posted @ 2025-04-22 21:22 破忒头头 阅读(48) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; import java.util.List; import java.util.Scanner; /** * @author Pickle * @since 2025/4/22 18:54 */ public class Demo { publ 阅读全文
posted @ 2025-04-22 19:51 破忒头头 阅读(14) 评论(0) 推荐(0)
摘要: 1、《高性能 MySQL(第三版)》 阅读全文
posted @ 2025-04-21 17:53 破忒头头 阅读(10) 评论(0) 推荐(0)
摘要: 1、暴力枚举+链表元素去重 不出意外直接超时 class Solution { public List<List<Integer>> threeSum(int[] nums) { int size = nums.length; //枚举所有结果 Arrays.sort(nums); List<Lis 阅读全文
posted @ 2025-04-17 21:46 破忒头头 阅读(17) 评论(0) 推荐(0)
摘要: 暴力枚举 O(N) class Solution { public int[] twoSum(int[] nums, int target) { int size = nums.length; for(int i = 0; i < size; i++){ for(int j = i + 1; j < 阅读全文
posted @ 2025-04-17 20:14 破忒头头 阅读(11) 评论(0) 推荐(0)