12 2024 档案
树状树学习
摘要:简介 树状树 是在线段树的基础上生成的,更精简,用在快速求 一串数据的区间和 code public class BinaryIndexedTree { private int[] tree; private int n; public BinaryIndexedTree(int [] arr) { 阅读全文
posted @ 2024-12-28 22:13 HDU李少帅 阅读(15) 评论(0) 推荐(0)
线段树学习
摘要:线段树 简而言之:就是 层数是 log2(n) 的树,然后用来快速求其中的区间和 代码 public class SegmentTree { private int[] tree; private int n; public SegmentTree(int [] arr) { n = arr.len 阅读全文
posted @ 2024-12-28 21:22 HDU李少帅 阅读(28) 评论(2) 推荐(0)