1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 14:32:54 +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,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 18,
"likes": 20,
"dislikes": 1,
"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}]",
@@ -46,7 +46,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"334\", \"totalSubmission\": \"490\", \"totalAcceptedRaw\": 334, \"totalSubmissionRaw\": 490, \"acRate\": \"68.2%\"}",
"stats": "{\"totalAccepted\": \"360\", \"totalSubmission\": \"547\", \"totalAcceptedRaw\": 360, \"totalSubmissionRaw\": 547, \"acRate\": \"65.8%\"}",
"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 weve seen, and the order that we see them in. Once we see a node weve already visited, we know that the cycle contains the node that was seen twice and all the nodes that we visited in between.",