More solutions for leetcode