Minimum Array End Leetcode