Google Interview Question

No comment. It is just like basic algorithm problem. I was given 2 problems, one is related with List, and another is related with graph.