leetcode medium array problems