1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +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": false,
"difficulty": "Hard",
"likes": 183,
"likes": 184,
"dislikes": 32,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"45.2K\", \"totalSubmission\": \"82.9K\", \"totalAcceptedRaw\": 45175, \"totalSubmissionRaw\": 82885, \"acRate\": \"54.5%\"}",
"stats": "{\"totalAccepted\": \"45.2K\", \"totalSubmission\": \"82.9K\", \"totalAcceptedRaw\": 45206, \"totalSubmissionRaw\": 82934, \"acRate\": \"54.5%\"}",
"hints": [
"We can think of this problem as the problem of finding an Euler path (a path visiting every edge exactly once) on the following graph: there are $$k^{n-1}$$ nodes with each node having $$k$$ edges. It turns out this graph always has an Eulerian circuit (path starting where it ends.)\r\n\r\nWe should visit each node in \"post-order\" so as to not get stuck in the graph prematurely."
],