https://mixrolikus.cc/video/r70PyLfDqD8/quick-minimum-and-maximum-algorithm