Calculate Runtime for Sorting Polygons