Finding the Upper Envelope of n Line Segments



I need an algorithm to find to find the upper envelope of n line segments in
O(n log n) time. Where can I find such an algorithm?

Thanks.
Jessica


.