Ocrolus interview question

Basic string array algorithm questions.