Reddit Daily Programmer problems solved in C++