This repository contain a basic implementation of Segment Trees along with its use in various applications in problems related to unions of rectangles. Specifically, the union, perimeter and contour of union of rectangles. The algorithms for these implementations are borrowed from the book "Computational Geometry - An Introduction" by Preparata and Shamos.