Google Interview Question

I was asked a recursive graph question