Minimum Array End Leetcode Two