Minimum Array End Leetcode Contest Solutions