LeetCode Exam in C++