1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 06:51:41 +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,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 183,
"dislikes": 201,
"likes": 184,
"dislikes": 203,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "6\n[[1,2],[1,3],[3,2],[4,1],[5,2],[3,6]]\n7\n[[1,3],[4,1],[4,3],[2,5],[5,6],[6,7],[7,5],[2,6]]",
@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"14.6K\", \"totalSubmission\": \"35.3K\", \"totalAcceptedRaw\": 14632, \"totalSubmissionRaw\": 35258, \"acRate\": \"41.5%\"}",
"stats": "{\"totalAccepted\": \"14.7K\", \"totalSubmission\": \"35.4K\", \"totalAcceptedRaw\": 14668, \"totalSubmissionRaw\": 35364, \"acRate\": \"41.5%\"}",
"hints": [
"Consider a trio with nodes u, v, and w. The degree of the trio is just degree(u) + degree(v) + degree(w) - 6. The -6 comes from subtracting the edges u-v, u-w, and v-w, which are counted twice each in the vertex degree calculation.",
"To get the trios (u,v,w), you can iterate on u, then iterate on each w,v such that w and v are neighbors of u and are neighbors of each other."