X interview question

Clone graph