Hackerrank Challenges - Hackerrank in a String

(CM) Part of the solution can be gleaned by reading the problem description in Hackerrank.