Currently MakeSegmentTree and SegmentTree ctor take ptr and size as inputs. Replace it with `std::vector` (or `std::span`)