PointSetMinTree

class PointSetMinTree : public PointSetSegmentTree<int, PointSetMinTree>

Public Types

using NodeType = int

Public Functions

void updateFromChildren(NodeType &parent, NodeType &leftChild, NodeType &rightChild)
int rightMostLessThan(size_t position, int value)

Find right most position with value than less than given in range [0; position].

Return

returns the position with searched property or -1 if there is no such position.

Parameters
  • position: inclusive right side of query range

  • value: search for position less than this

int leftMostLessThan(size_t position, int value)

Find left most position with value less than value in range [position; size).

Return

returns the position with searched property or -1 if there is no such position.

Parameters
  • position: inclusive left side of query range

  • value: search for position less than this