Tripadvisor interview question

Typical string manipulation and graph traversal questions.