fun computeRightChild(node: SegmentTreeNode<*>): SegmentTreeNode<*>? { return if (node.right - node.left > 1) { constructor.construct((node.left + node.right) / 2, node.right) } else null }
Compute the right child node , if it exists