implemented problems from leetcode