Implement solve(obj, replacer) that serializes an object to a JSON string,
replacing circular references with the string "[Circular]".
A replacer is an optional array of keys to include (same as JSON.stringify's
second argument). Pass null to include all keys.
Example
const a = { x: 1 };
a.self = a;
solve(a, null) // '{"x":1,"self":"[Circular]"}'Sample tests