submission for LeetCode