OpenTable interview question

Simple string traversal.