two problem of leetcode