partially finished with some phone screen exercises in C++