Don't use sort to find maximum and minimum points
Use std::vec::unzip