1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-07 00:11:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -46,7 +46,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2.5K\", \"totalSubmission\": \"3.5K\", \"totalAcceptedRaw\": 2482, \"totalSubmissionRaw\": 3542, \"acRate\": \"70.1%\"}",
"stats": "{\"totalAccepted\": \"2.5K\", \"totalSubmission\": \"3.5K\", \"totalAcceptedRaw\": 2483, \"totalSubmissionRaw\": 3543, \"acRate\": \"70.1%\"}",
"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.",