code: function PrefixIntervalTree(leafCount, /*?number*/ initialLeafValue) {
      var internalLeafCount = this.getInternalLeafCount(leafCount);
      this.$PrefixIntervalTree_leafCount = leafCount;
      this.$PrefixIntervalTree_internalLeafCount = internalLeafCount;
      var nodeCount = 2 * internalLeafCount;
      var Int32Array = global.Int32Array || Array;
      this.$PrefixIntervalTree_value = new Int32Array(nodeCount);
      this.$PrefixIntervalTree_initTables(initialLeafValue || 0);
  
      this.get = this.get.bind(this);
      this.set = this.set.bind(this);
      this.lowerBound = this.lowerBound.bind(this);
      this.upperBound = this.upperBound.bind(this);
    }
docs: An interval tree that allows to set a number at index and given the value
  find the largest index for which prefix sum is greater than or equal to value
  (lower bound) or greater than value (upper bound)
  Complexity:
  construct: O(n)
  query: O(log(n))
  memory: O(log(n)),
  where n is leafCount from the constructor