Minimum Array End Leetcode Solution 862 Country