Applied Intuition interview question

Simple array, string challenges from Chackerrank.