Minimum Array End Leetcode Sql Window