Accepted source code for LeetCode Online Judge