C Efficient Algorithm To Return All Rectangles On A Surface Stack

C Efficient Algorithm To Return All Rectangles On A Surface Stack