minimum and maximum element of an Array