DANA interview question

Two different sets of hackerrank tests