Leetcode problems in c++