Whitepages interview question

Array hopper was the coding challenge that I was given.