Segmented Trees