Minimum Array End Leetcode Sql 50