Constructors

Accessors

Constructors

  • The constructor initializes the properties of a SegmentTreeNode object.

    Parameters

    • start: number

      The start parameter represents the starting index of the segment covered by this node in a segment tree.

    • end: number

      The end parameter represents the end index of the segment covered by this node in a segment tree.

    • sum: number

      The sum parameter represents the sum of the values in the range covered by the segment tree node.

    • Optionalvalue: number

      The value parameter is an optional parameter of type SegmentTreeNodeVal. It represents the value associated with the segment tree node.

    Returns SegmentTreeNode

Accessors

  • get value(): undefined | number
  • The function returns the value of a segment tree node.

    Returns undefined | number

    The value being returned is either a SegmentTreeNodeVal object or undefined.

  • set value(value): void
  • The function sets the value of a segment tree node.

    Parameters

    • value: undefined | number

      The value parameter is of type SegmentTreeNodeVal or undefined.

    Returns void