range_sum abstract method

T range_sum({
  1. required int index_from,
  2. required int index_to,
})

Returns the sum between two indices.

Example: If the tree is built with 1, 2, 3, 4, 5 then rangeSum(1, 4) will return the sum of 2, 3, 4 which is 9.

Implementation

T range_sum({
  required final int index_from,
  required final int index_to,
});