TikTok Interview Question

Clone a graph and return a copy (coding)