摘要:
示例: 输入: [[100, 200], [200, 1300], [1000, 1250], [2000, 3200]] 输出: 3 解释: 这里一共有 4 门课程, 但是你最多可以修 3 门: 首先, 修第一门课时, 它要耗费 100 天,你会在第 100 天完成, 在第 101 天准备下门课。 阅读全文
posted @ 2021-09-18 16:27
三一一一317
阅读(86)
评论(0)
推荐(0)
摘要:
示例 2: 输入: 4, [[1,0],[2,0],[3,1],[3,2]] 输出: [0,1,2,3] or [0,2,1,3] class Solution { public: vector<int> findOrder(int numCourses, vector<vector<int>>& 阅读全文
posted @ 2021-09-18 15:19
三一一一317
阅读(84)
评论(0)
推荐(0)
摘要:
class Solution { public: bool isBipartite(vector<vector<int>>& graph) { int n = graph.size(); if(n==0) return true; queue<int> q; vector<int> color(n, 阅读全文
posted @ 2021-09-18 14:52
三一一一317
阅读(36)
评论(0)
推荐(0)

浙公网安备 33010602011771号