Solution of LeetCode OJ in C++