2691. Immutability Helper
Hints
Hint 1
Javascript has the concept of Proxy. That concept is critical to this problem.
Hint 2
You you need to keep track of which values in the JSON were overwritten with new values.
Hint 3
Somehow, keep a tree structure that exists parallel to the original object. This will keep track of all the edits.
Hint 4
When the mutator function is done. Return a clone with those mutations applied. It will be inefficient to clone the entire object so only clone the minimum number of nodes.
Preparing judge…