Amazon interview question

Reverse Array Queries, and Validating Strings with Regex