leetcode 7.30