Accepted code on leetcode site