![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础算法
希可诺、
北京211读研 安全方向
展开
-
算法模板一(快排,归并,前缀和等)
快排、归并、前缀和,差分、位运算 快排 public static void quick(int l, int r) { if (l >= r) { System.out.println(nums[m]); return; } int i = l-1, j = r+1, mid = nums[l + r >> 1]; while (i < j) { ...原创 2022-04-07 17:00:29 · 102 阅读 · 0 评论 -
基本类型递归(指数型,排列型,组合型递归)
92. 递归实现指数型枚举 - AcWing题库 93. 递归实现组合型枚举 - AcWing题库 94. 递归实现排列型枚举 - AcWing题库 //初始化遍历 static Scanner sc = new Scanner(System.in); static int n, m;//待输入变量 static int[] path;//路径信息 static boolean[] st;//选中状态 排列型枚举 public static void dfs(int deep) {原创 2022-04-07 16:44:54 · 147 阅读 · 0 评论