Google Interview Question

I had one graph problem and one string-processing problem.