Added extract min and max values from an unsorted array