rewrite leetcode minimum window substring