mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 06:22:54 +08:00
update
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"35\", \"totalSubmission\": \"48\", \"totalAcceptedRaw\": 35, \"totalSubmissionRaw\": 48, \"acRate\": \"72.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"37\", \"totalSubmission\": \"50\", \"totalAcceptedRaw\": 37, \"totalSubmissionRaw\": 50, \"acRate\": \"74.0%\"}",
|
||||
"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