Google interview question

The first question is string manipulation. The second is graph.