C++ program solving Spotify's tech puzzle Cat vs Dog