solution for problems in leetcode