Took a codility test in C++, figured I would share the responses.