https://ideas.creativecasinoties.com/post/find-minimum-and-maximum-in-an-array-nibpw3