Helix interview question

hackerrank challenge problems