1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-21 21:16:45 +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

@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"2.3K\", \"totalSubmission\": \"7.7K\", \"totalAcceptedRaw\": 2310, \"totalSubmissionRaw\": 7748, \"acRate\": \"29.8%\"}",
"stats": "{\"totalAccepted\": \"2.3K\", \"totalSubmission\": \"7.8K\", \"totalAcceptedRaw\": 2318, \"totalSubmissionRaw\": 7791, \"acRate\": \"29.8%\"}",
"hints": [
"From the given array favorite, create a graph where for every index i, there is a directed edge from favorite[i] to i. The graph will be a combination of cycles and chains of acyclic edges. Now, what are the ways in which we can choose employees to sit at the table?",
"The first way by which we can choose employees is by selecting a cycle of the graph. It can be proven that in this case, the employees that do not lie in the cycle can never be seated at the table.",