leetcode 6.1