Your question is Deep Clone Nested Structures. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a function deep_clone(value) that returns a deep copy of a JavaScript-style value represented in Python using dictionaries, lists, primitives, and None. The clone must recursively copy nested lists and dictionaries so that modifying the result does not affect the original. Handle cyclic references by preserving structure in the clone rather than recursing forever.
None, list, or dictionary10^4 total elementsdef deep_clone(value):