leetcode problem solved