C++ implementation of segment tree for calculating the minimum from a given array.