摘要:
简介 树状树 是在线段树的基础上生成的,更精简,用在快速求 一串数据的区间和 code public class BinaryIndexedTree { private int[] tree; private int n; public BinaryIndexedTree(int [] arr) { 阅读全文
摘要:
线段树 简而言之:就是 层数是 log2(n) 的树,然后用来快速求其中的区间和 代码 public class SegmentTree { private int[] tree; private int n; public SegmentTree(int [] arr) { n = arr.len 阅读全文