mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 14:32:54 +08:00
update
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 20,
|
||||
"dislikes": 1,
|
||||
"likes": 29,
|
||||
"dislikes": 4,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Paths in Maze That Lead to Same Room\", \"titleSlug\": \"paths-in-maze-that-lead-to-same-room\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "7\n[[1,2],[2,3],[3,4],[4,1],[0,1],[5,2],[6,5]]\n9\n[[0,1],[1,2],[0,2],[2,6],[6,7],[6,8],[1,3],[3,4],[3,5]]",
|
||||
@@ -46,7 +46,7 @@
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"360\", \"totalSubmission\": \"547\", \"totalAcceptedRaw\": 360, \"totalSubmissionRaw\": 547, \"acRate\": \"65.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"556\", \"totalSubmission\": \"809\", \"totalAcceptedRaw\": 556, \"totalSubmissionRaw\": 809, \"acRate\": \"68.7%\"}",
|
||||
"hints": [
|
||||
"This problem can be broken down into two parts: finding the cycle, and finding the distance between each node and the cycle.",
|
||||
"How can we find the cycle? We can use DFS and keep track of the nodes we’ve seen, and the order that we see them in. Once we see a node we’ve already visited, we know that the cycle contains the node that was seen twice and all the nodes that we visited in between.",
|
||||
|
Reference in New Issue
Block a user