1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 06:22:54 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -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 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.",