FactSet Interview Question

String manipulation hackerrank questions involving bits