public void BinaryIndexedTreeSuccess() { int[] array = new int[] { 1, 3, 5 }; int n = array.Length; var binaryTree = new BinaryIndexedTree(array); var result = binaryTree.RangeQuery(0, n - 1); Assert.AreEqual(result, 9); }
public void BinaryIndexedTreeSuccess() { int[] array = new int[] { 1, 3, 5 }; int n = array.Length; var binaryTree = new BinaryIndexedTree(array); var result = binaryTree.RangeQuery(0, n - 1); Assert.AreEqual(result, 9); }