Amazon Interview Question

clone a graph which has cycles