https://ideas.creativecasinoties.com/post/finding-minimum-and-maximum-in-an-array-lxs3xl