This repo contains a selected few Hackerrank challenges. I've included the given code along with the solution code denoted by comments as well as the problem definition.
In the way that hackerrank works, each snippet is a fully functioning program and as such can be built with g++ problem.cpp -o problem
with c++ 11+.