C3 AI interview question

Finishing a HackerRank test with three different questions.