MathWorks interview question

Clone graph