Shamos hoey algorithm finished.