1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +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

@@ -12,7 +12,7 @@
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 967,
"dislikes": 66,
"dislikes": 67,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Parallel Courses\", \"titleSlug\": \"parallel-courses\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "4\n[[2,1],[3,1],[1,4]]\n2\n5\n[[2,1],[3,1],[4,1],[1,5]]\n2",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"16.6K\", \"totalSubmission\": \"55.7K\", \"totalAcceptedRaw\": 16607, \"totalSubmissionRaw\": 55719, \"acRate\": \"29.8%\"}",
"stats": "{\"totalAccepted\": \"16.6K\", \"totalSubmission\": \"55.7K\", \"totalAcceptedRaw\": 16611, \"totalSubmissionRaw\": 55741, \"acRate\": \"29.8%\"}",
"hints": [
"Use backtracking with states (bitmask, degrees) where bitmask represents the set of courses, if the ith bit is 1 then the ith course was taken, otherwise, you can take the ith course. Degrees represent the degree for each course (nodes in the graph).",
"Note that you can only take nodes (courses) with degree = 0 and it is optimal at every step in the backtracking take the maximum number of courses limited by k."