Veeva Systems interview question

some array traversal problems. one with strings