leetcode submission 11 with test case