1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 06:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 15:21:05 +08:00
parent b84ae535b7
commit e730aa6794
2244 changed files with 8703 additions and 59499 deletions

View File

@@ -11,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 8196,
"dislikes": 962,
"likes": 8206,
"dislikes": 963,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Clone Graph\", \"titleSlug\": \"clone-graph\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Clone Binary Tree With Random Pointer\", \"titleSlug\": \"clone-binary-tree-with-random-pointer\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Clone N-ary Tree\", \"titleSlug\": \"clone-n-ary-tree\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[[7,null],[13,0],[11,4],[10,2],[1,0]]\n[[1,1],[2,1]]\n[[3,null],[3,0],[3,null]]",
@@ -119,7 +119,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"761.1K\", \"totalSubmission\": \"1.6M\", \"totalAcceptedRaw\": 761066, \"totalSubmissionRaw\": 1596740, \"acRate\": \"47.7%\"}",
"stats": "{\"totalAccepted\": \"762.2K\", \"totalSubmission\": \"1.6M\", \"totalAcceptedRaw\": 762163, \"totalSubmissionRaw\": 1598064, \"acRate\": \"47.7%\"}",
"hints": [
"Just iterate the linked list and create copies of the nodes on the go. Since a node can be referenced from multiple nodes due to the random pointers, make sure you are not making multiple copies of the same node.",
"You may want to use extra space to keep <b>old node ---> new node</b> mapping to prevent creating multiples copies of same node.",