Add SegmentTree correctness test implementation