public static void ConstructSegTreeTest_Array_Power_Of_2() { var segTree = new SegmentTree(); var arr = new[] { 1, 2, 3, 4, 5, 6, 7, 8 }; var size = segTree.FindSegmentTreeSize(arr.Length); var segArr = new int[2 * size - 1]; segTree.ConstructSegTree(segArr, arr, 0, arr.Length - 1, 0); //Assert Assert.AreEqual(36, segArr[0]); }