We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a73f5ca commit 14c1201Copy full SHA for 14c1201
clone-graph/wogha95.js
@@ -60,7 +60,9 @@ var cloneGraph = function (node) {
60
// 2. memory에 val에 해당하는 node 반환 (없을 경우 생성)
61
function getCloneNode(val) {
62
if (!memory.has(val)) {
63
- memory.set(val, new _Node(val));
+ const node = new _Node(val);
64
+ memory.set(val, node);
65
+ return node;
66
}
67
68
return memory.get(val);
0 commit comments