Minimum Array End Leetcode Solutions Cpp